[Module] DPI Awareness
Re: [Module] DPI Awareness
Just a note... it works as long as you do not move the Window to a monitor with different DPI settings.
Re: [Module] DPI Awareness
Hello Thunder93, many thanks for the Per-Monitor DPI Awareness example.
Since the PB dpi aware supported is there a way acivate 'Per-Monitor DPI Awareness'
and use the PB commands?
Ciao Dige
Since the PB dpi aware supported is there a way acivate 'Per-Monitor DPI Awareness'
and use the PB commands?
Ciao Dige
"Daddy, I'll run faster, then it is not so far..."
Re: [Module] DPI Awareness
Just a note
As far as I could figure out by searching the internet, the DPI awareness constant values as needed for SetProcessDpiAwarenessContext are as follows:
They're some wacky pointer anonymous structure stuff? MS...
As far as I could figure out by searching the internet, the DPI awareness constant values as needed for SetProcessDpiAwarenessContext are as follows:
Code: Select all
#DPI_AWARENESS_CONTEXT_UNAWARE = 16
#DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = 17
#DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = 18
#DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = 34
corrected by peeking with visual studio c++... and checking result in taskmgr after SetProcessDpiAwarenessContext_ (nowhere else to be found...) :
#DPI_AWARENESS_CONTEXT_UNAWARE = $6010 ;24592
#DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = $9011 ;36881
#DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = $12 ;18
#DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = $22 ;34
#DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED = $40006010 ;1073766416
Code: Select all
#define DECLARE_HANDLE(name) struct name##__{int unused;}; typedef struct name##__ *name
DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
#define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1)
#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2)
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3)
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4)
#define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5)