It is currently Wed Sep 23, 2020 10:28 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: [Module] DPI Awareness
PostPosted: Fri Jun 07, 2019 10:55 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 319
Location: NL
Just a note... it works as long as you do not move the Window to a monitor with different DPI settings.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DPI Awareness
PostPosted: Mon Oct 28, 2019 11:52 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 1046
Location: Germany
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

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DPI Awareness
PostPosted: Fri Aug 28, 2020 4:30 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 319
Location: NL
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:
Code:
#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


They're some wacky pointer anonymous structure stuff? MS...
Code:
#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)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye