Print Page | Close Window

GetDpiAwareness

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24465
Printed Date: 09 May 2024 at 9:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GetDpiAwareness
Posted By: andreypir
Subject: GetDpiAwareness
Date Posted: 13 March 2024 at 7:33pm
What is the expected way to use CXTPDpi::GetDpiAwareness? When I call it, it tries to call the system GetProcessDpiAwareness but the function is unavailable because InitDpiAwareness was not called, so it returns xtpDpiUnaware regardless of the actual state of my process. The actual state is set in the project properties.
 
InitDpiAwareness is declared as private. So the only way I can find is to first get my process awareness outside of CXTPDpi, put that into CXTPDpi::SetDpiAwareness and then call GetDpiAwareness to get the value I already know.
 
Is there a better way?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net