Print Page | Close Window

[SOLVED]CXTPWindowPos and DPI

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=23246
Printed Date: 25 April 2024 at 11:51am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED]CXTPWindowPos and DPI
Posted By: cpede
Subject: [SOLVED]CXTPWindowPos and DPI
Date Posted: 17 January 2017 at 3:00am
Has anyone also seen a problem when using CXTPWindowPos when changing DPI?

When e.g. running 100% DPI and using:
CXTPWindowPos().SaveWindowPos(this,_T("WindowPlacement"),_T("Dialogs\\MyDialog"));

and then when changing to 150% DPI and using:
CXTPWindowPos().LoadWindowPos(this,_T("WindowPlacement"),_T("Dialogs\\MyDialog"));

Then I see that the dialog size is the same, but the content cannot fit since it is scaled to 150% DPI.

Any good ideas to solve this problem generally?

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Replies:
Posted By: cpede
Date Posted: 20 August 2019 at 9:22am
Still not solved in v19 ??.

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: markr
Date Posted: 20 August 2019 at 5:50pm
> Any good ideas to solve this problem generally?

My approach has been to append a DPI indicator to the lookup key (e.g. "WindowPlacement" becomes "WindowPlacement_192" for 200% scaling). So then you can either just track separate layouts (can't imagine users are changing DPI settings very often) or re-calculate and overwrite when you detect a change.


Posted By: cpede
Date Posted: 21 August 2019 at 1:33am
Thanks for the idea, I will use that. Actually you would be surprised how often this is reported as a problem.

By the way, now the CXTPWindowPos class can be handled, but what about the CXTPResizeDialog and CXTPResizePropertySheet using the CXTPResize class Load/SavePlacement, will they have the same problem? And are you handling these the same way?

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: agontarenko
Date Posted: 30 September 2019 at 4:41am
Hello,

I'm glad to inform you that the issue has been addressed and fixed.
The fix will be available in 19.1 release.

Regards,
Artem Gontarenko



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