Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Change in DPI effects dialog size Collapse All
Subject Author Date
Eric May 25, 2011 - 11:17 AM

Small problem.

We have many dialogs that use the EnableSaveRestore function.

If one changes the DPI (right click desktop, Properties, Settings, Advanced) from 96 to 120, the dialogs will end up being to small because the settings in the registry we set using 96 DPI.

Is there a way to detect a change in DPI to set the correct dialog size.

Or, I guess, in the worst case, shoot the directory; If you do this, the dialogs will end up having the right size.

Technical Support May 30, 2011 - 3:02 AM

The problem is a bit more complex because an application can start next time and use a different UI theme where the non client area skin uses some other caption and different border sizes.
The problem is not critical because the restored window size will not be smaller then the enabled minimal tracking size and larger than the maximal one. Besides, DPI changing is performed rarely. For instance, when you install Windows on a new PC or when you have a new monitor.
The shoot the directory approach can be coded directly in your project. It requires all resizable dialogs to use the same directory. I.e. the same first parameter value in invocation of the EnableSaveRestore() API.