We are having a problem with one of our existing Win32 MFC-based applications. It does not display correctly on displays that use high resolution settings. More specifically, in Windows XP with a resolution of 120 dpi, there are several places in the application where the text is scaled, but not their containers (the text overflows the borders of its buttons, etc.). This also happens on Windows 7 (and Vista) when "> 96 dpi" is selected and "use XP style dpi scaling" is selected. If xp style scaling is not selected, I understand that Win7 uses DPI virtualization instead. Everything works fine when using DPI virtualization (everything is fine, but at least they are correct). By default in Win7 120 dpi, xp style scaling is used, and the next setting (144 dpi) is not used.Thus, our application looks correct at 144 dpi, but incorrect at 120 dpi.
If I edit the application manifest to declare the application “DPI aware”, this will result in DPI virtualization (but not XP-style dpi scaling) and it won’t find me. Everything still looks very bad (no change for 120 dpi, 144 dpi is now broken).
I need to fix this problem, and I tried reading the DPI / scaling questions in general, and it was a learning experience. So far I have not found a suitable solution. At the moment, I'm not going to make a thorough and correct correction (the application correctly scales all the elements in accordance with the dpi resolution). This will require a lot of rewriting. I think there are two possible solutions. One of them disables any DPI scaling. This would mean that if the Win7 user system were installed at 120 dpi, everything in their system would look good / large, but our application would look right, but it would be small compared to everything else in other applications. The second solution will be how to get our application to use DPI virtualization,but never use XP style dpi scaling. I want this to be a change on the application side and not rely on end users to make Windows configuration changes.
.
- , ?