dave_gnukem icon indicating copy to clipboard operation
dave_gnukem copied to clipboard

Windows DPI v2

Open learn-more opened this issue 4 years ago • 1 comments

Hello,

First of all, thanks for your efforts to add support for WinXP / ReactOS :)

Regarding your djDYNAMICALLY_BIND_SETPROCESSDPIAWARE code: This is nothing to be nervous about! GetProcAddress is very well documented, and will return NULL (0) when the function is not present. Your function prototype (typedef int (WINAPI *PFN)();) is almost correct (but not incorrect in a way that it will break anthing, just the return value is different, which you don't check anyway).

Here is an article describing the manifest way of doing this, and even doing it per-monitor (in a way that has a gracious fallback to not doing anything on Windows XP / ReactOS) https://building.enlyze.com/posts/writing-win32-apps-like-its-2020-part-3/#declaring-dpi-awareness

Regards,

Mark.

learn-more avatar Sep 17 '20 11:09 learn-more

Thank you! And thanks for ReactOS, I am a fan .. have seen these manifests for DPI but have never looked closely at trying them ... will try have a look sometime.

I've used this dynamic DLL loading methods many times but felt a bit funny/unsure using it this way this time .. but reassuring to hear ... am hoping the latest 1.0.3 release works on ReactOS

davidjoffe avatar Nov 20 '22 12:11 davidjoffe