Author | Topic: Re: Bug in AppDesktop():CurrentSize() | |
---|---|---|
Andreas Gehrs-Pahl View the complete thread for this message in: | Re: Bug in AppDesktop():CurrentSize() on Fri, 23 Oct 2015 02:05:42 -0400 Itai, >Thank you! Thank you! Thank you, Andreas!!! >This is valuable info well delivered. You are welcome. >One more follow-up question: >Can I set (via manifest or otherwise) the application to 96 DPI (100%) >regardless of the computer settings? Yes, if you (always) enable DPI virtualization, the DWM will do the scaling of your application, and the application will think it is at 96 DPI (100%) regardless of the computer's actual settings. But this is what you didn't like, according to your original post, because the OS APIs will report a lower resolution than the one actually set, while the DWM will do the scaling for you. I haven't tried it, but using <dpiAware>false</dpiAware> in your manifest file might do exactly that -- enable DPI virtualization at any scale factor. Follow the link to the MS article about DPI-aware applications at the end of my previous post. It explains a lot of this in detail and the differences between the various OS versions. As a general note, the best option would be to actually create a DPI-aware application and to size all GUI elements and fonts according to the selected scaling factor (DPI setting) and resolution at runtime. This would result in a much better resolution (no blurriness) and no GUI rendering issues -- like the ones mentioned in the MS article. Maybe Alaska could add such a feature to their future layout manager/visual designer in Xbase++ Version 3.0, allowing for automatic, out-of-the-box, DPI-aware GUI elements and behavior. Especially since Windows 8.1 introduced dynamic DPI scaling (and the corresponding events). Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net |