Windows DPI scaling woes

297 Views Asked by At

In Window 10, using MFC, I have a dialog in my app that displays at different sizes in different situations. In "Simple" mode it's a fixed size with fixed sized content, in 'Advanced' mode its re-sizable with (some) resizable elements.

I'm trying to make allow for high DPI situations and DPI scaling not equal to 100%. I'm using a simple scaling factor equal to the DPI scaling (e.g., *1.5 for 150%, etc.) It's not perfect, but works adequately at 100%, 150% and 200%. However, at 125% and 175% something doesn't quite work, and setting my dialog to the fixed size makes it too small for its content. It's almost like it doesn't scale equally in both directions.

Now I could tailor my size/scaling adjustment individually to each DPI scaling setting - but I'm not sure how that would work if the user picks a custom %.

Does anyone have any insight into what is wrong / how to do this correctly?

EDIT...some screenshots:

You can see that none of the dialogs are unusable, but 125 and 175 are a little worse in terms of fitting.

100% 100%

125% 125%

150% 150%

175% 175%

200% 200%

0

There are 0 best solutions below