Questions tagged [setwindowpos]

16 questions
3
votes
2 answers

GLFW Mouse event lag with window drag

I am trying to drag an undecorated window in GLFW but am encountering some event lag, even though I am using glfwWaitEvents() I have a cursor position callback, and a simple loop: // register a cursor position callback glfwSetCursorPosCallback(win,…
2
votes
0 answers

Issue with monitor numbers when docking laptop to multiple monitors

I developed an application that I can assign programs to specific monitors so that when I dock my laptop, which results in all my open windows being pushed to my main monitor, I can press a global hotkey, Alt+d, and all the applications that have…
Jordanr
  • 21
  • 4
1
vote
0 answers

Windows restore position sometimes doesn't work

I wrote a simple C# program that saves the locations and sizes of open windows to a file, and then can also restore them from that file (based on command-line arguments). This always works for some programs and not for others, and I don't know…
radumanolescu
  • 3,607
  • 1
  • 20
  • 30
1
vote
1 answer

Create a WordPad instance and bring it to the top z-order, all from a non-foreground app

I am working with voice-operated software (Dragon from Nuance, or maybe Windows Speech Recognition (haven't tried that yet)). In operation, the user (me) issues a voice command to make something happen. For this question, I am trying to write code…
Kevin
  • 972
  • 1
  • 8
  • 24
1
vote
1 answer

SetWindowPos even when the main thread is blocked?

I'm trying to make my program move itself via a call to SetWindowPos every 10 milliseconds, to follow the cursor. Problem is, when my program's main thread is blocked by a Thread.Sleep(), the window stops moving. I put the call to SetWindowPos into…
NERL
  • 143
  • 3
  • 13
1
vote
0 answers

SetWindowPos with different scaling monitors sets position to a wrong location

I have 2 monitors with different resolution and scaling: 2560 * 1440 scaling x1 (Primary) 1920 * 1200 scaling x1.5 (to the left from primary [2][1] aligned to top) My application is changing position of another app window. The window I try to set…
htonus
  • 469
  • 1
  • 6
  • 17
1
vote
1 answer

WinAPI CreateWindow WS_POPUP resize flickering

I'm creating a window with no borders (WS_POPUP in CreateWindow) and need to resize it when mouse is over and change back when mouse is out of the application. It works OK, but it flickers when I change the position using SetWindowPos. I need to…
Andrei
  • 145
  • 1
  • 14
1
vote
0 answers

SetWindowPos not moving or resizing window

When I call SWP to try and move a resize a specific window. It does not move or resize. SetWindowPos(hWndWindow, NULL, 0, 0, 500, 500, SWP_NOZORDER); The window handle is valid. I tried both getting the handle with FindWindow and by manually…
John
  • 5,001
  • 3
  • 32
  • 60
0
votes
0 answers

C# SetWindowPos causes window not to be movable

I am opening a couple of external windows (remote app windows) from my .NET application. However, after the two windows are open, and after I get their respective window handles, I loop through them to set them as TopMost and also to move them to a…
Ray
  • 4,019
  • 7
  • 33
  • 82
0
votes
1 answer

Windows desktop coordinate system is off for certain windows

I've run into an issue when developing some software for windows, an issue related around moving windows on the screen. Basically, I've found that specific windows will consitantly not follow the coordinate system. I have a function that takes a…
Jordan J
  • 28
  • 3
0
votes
0 answers

How to move a non-Visible Application

This is a follow up question to one of the answers provided for post Quit() causes Access to become visible for a moment. The answer recommends that I move the window off screen so that the flickering window can't be seen. If I understand the…
Mandelbrotter
  • 1,181
  • 7
  • 17
0
votes
0 answers

Clicking anywhere will maximize a window that I just hide with setwindowpos()

So, I'm using this for a game that starts as fullscreen. I first do this to make it window mode: SetWindowLongPtr(pantalla, GWL_STYLE, WS_CAPTION | WS_VISIBLE | WS_CLIPSIBLINGS | WS_SYSMENU); SetWindowLongPtr(pantalla, GWL_EXSTYLE,…
user1913644
  • 137
  • 1
  • 8
0
votes
1 answer

Start a program on different screen

I've already checked out: SetWindowPos not working on Form.Show() Launch an application and send it to second monitor? However, none of these solutions seem to work for me. I want to open an external program on a different monitor. This is my…
mrid
  • 5,408
  • 5
  • 19
  • 56
0
votes
1 answer

c# Programmatically move Citrix window

Using the next answer I am trying to programmatically reposition a citrix window, somehow the window does not move. I assume the process name that holds the Citrix window is one of the next processes that were added in Process.GetProcesses() after I…
Avishay
  • 197
  • 9
0
votes
2 answers

The correct method for drawing a bitmap image into a window

I have a function which takes a rectangular region of a bitmap image, rescales it to different dimensions, and draws it at some offset inside of a window within my dialog-box application: void DrawImage(HANDLE hImageBitmap, CDC*…
goodvibration
  • 5,302
  • 1
  • 17
  • 43
1
2