Getting an DPI aware correct RECT from GetWindowRect from a external window

前端 未结 2 1849
有刺的猬
有刺的猬 2020-12-31 04:15

I\'m in the process of making an application DPI Aware but I have a need to do a GetWindowRect on HWNDs from other applications. My problem is this works fine o

2条回答
  •  轮回少年
    2020-12-31 05:07

    DPI aware flag is set over application level and not the window level So if you are able to get the process of that particular window handle of other application then you can use GetProcessDpiAwareness() function to get the dpi aware flag of that particular process please see this microsoft documentation https://msdn.microsoft.com/en-us/library/windows/desktop/dn302113(v=vs.85).aspx

提交回复
热议问题