Closed cjee21 closed 4 weeks ago
🤔 maybe should use GetDpiForWindow
instead
Changed to GetDpiForWindow
. Still works fine. Now new API works on Windows 10 Anniversary Update onwards.
I was not aware of ILINK_DelayLoadDll
, I was implementing the dynamic load myself but this method is better.
GetDpiForWindow
how many API is there for getting DPI??? :-p.
how many API is there for getting DPI??? :-p.
Many... https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-reference
Many...
😱
Side note: I was "flooded" (ok, not so much, but still a couple within a couple of hours) by emails / reports about Win7 despite its EOL for several years, so Win7 support is still important. (Me remembering some complains when we stopped WinXP support due to new Visual Studio not supporting it anymore few years ago so several years after its end of life... We'll have to support Win7 for several years)
Implement delayed loading of
user32.dll
and useGetDpiForWindow
. Should work on Windows 7 to 11 now.Tested on Windows 7 VM at 100% and 125% Tested on Windows 11 PC at 100% and 150%
Nothing unexpected noticed, all seems fine.