Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - [SOLVED]CXTPWindowPos and DPI
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED]CXTPWindowPos and DPI

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED]CXTPWindowPos and DPI
    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 (19.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2019 at 9:22am
Still not solved in v19 ??.

-cpede
Product: Xtreme ToolkitPro (19.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 402
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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 (19.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 125
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.