changed Windows scaling and now WinGetPos is wrong

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Skrell
Posts: 302
Joined: 23 Jan 2014, 12:05

changed Windows scaling and now WinGetPos is wrong

Post by Skrell » 04 Dec 2022, 16:44

So it appears as if all window measurements are correct; however, when I do a WinGetPos for a context menu the size of the drawn context menu is wrong. To be clear, I'm talking about class #32768

Is there anything I can do to correct for this? Or perhaps a different way of getting the window dimensions?

Also I've tried using WinGetPosEx and DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr") and DllCall("SetThreadDpiAwarenessContext", "ptr", -4, "ptr") and none of these fixed it.

Skrell
Posts: 302
Joined: 23 Jan 2014, 12:05

Re: changed Windows scaling and now WinGetPos is wrong

Post by Skrell » 06 Dec 2022, 10:17

Seriously no ideas? I tried manually scaling the dimensions to an inverse ratio proportional to the DPI increase I made in windows and it worked for MOST context menus; however, many are still wrong but now in the other direction, meaning the dimensions reported are too SMALL in stead of too large.

Post Reply

Return to “Ask for Help (v1)”