GetWindowRect has offset in Windows 10

前端 未结 1 684
慢半拍i
慢半拍i 2021-01-13 14:10

I use GetWindowRect in my program to get the coordinates of a window on the desktop. This works fine on a dozen or so PCs I have here for testing (XP-W8.1) but not on my one

相关标签:
1条回答
  • 2021-01-13 14:31

    Your program is not DPI aware and so is subject to DPI virtualization. That means that the coordinates returned by functions like GetWindowRect will be virtualized coordinates and so will not match the true screen coordinates.

    0 讨论(0)
提交回复
热议问题