Tom Mueller 5 Posted April 23, 2019 (edited) Most "older" applications do not have full support of High-DPI scaling. To enhance the appearance of these applications Microsoft added the gdiScaling option in Windows 10 Creators Update (1703) . <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings"> <gdiScaling>true</gdiScaling> </asmv3:windowsSettings> </asmv3:application> In the compatibility settings of the windows property dialog of an application this is marked as "System (enhanced)" Delphi manifest option do not support this scaling mode at the moment. Our Build-tool sets the gdiScaling option in the manifest - but a build inside the IDE with gdiScaling is not possible! I also added a feature request in QP: https://quality.embarcadero.com/browse/RSP-24175. If you miss this option too - please vote for It. Best regards, Tom Edited April 23, 2019 by Tom Mueller 2 Share this post Link to post
Dalija Prasnikar 1396 Posted April 23, 2019 To achieve what you want you can also use custom manifest instead of automatically generated one. Also, your request is a bit confusing - System (Enhanced) scaling in application properties dialog has nothing to do with System Aware setting you can choose for manifest. Auto generated manifest sets only dpiAware and dpiAwareness elements and you want ability to include gdiScaling element. 2 Share this post Link to post
Tom Mueller 5 Posted April 24, 2019 16 hours ago, Dalija Prasnikar said: To achieve what you want you can also use custom manifest instead of automatically generated one. Yes, but it would be easier and more logical if it would be an auto generate option. 16 hours ago, Dalija Prasnikar said: Also, your request is a bit confusing - System (Enhanced) scaling in application properties dialog has nothing to do with System Aware setting you can choose for manifest. Auto generated manifest sets only dpiAware and dpiAwareness elements and you want ability to include gdiScaling element. "System Aware" in Delphi should corresponds to "System" in application properties (<dpiAwareness>system</dpiAwareness>). So I named it "System Aware (enhanced)" that should correspond to "System (enhanced)" in application properties (<gdiScaling>true</gdiScaling>) Share this post Link to post
Dalija Prasnikar 1396 Posted April 24, 2019 15 minutes ago, Tom Mueller said: Yes, but it would be easier and more logical if it would be an auto generate option. Maybe, but this setting is merely a quick fix for seriously outdated applications. I am not sure how much sense it makes to add such support in IDE. 16 minutes ago, Tom Mueller said: "System Aware" in Delphi should corresponds to "System" in application properties (<dpiAwareness>system</dpiAwareness>). So I named it "System Aware (enhanced)" that should correspond to "System (enhanced)" in application properties (<gdiScaling>true</gdiScaling>) Again, dpiAware and dpiAwareness elements and their values are separate from gdiScaling element and setting that appears in application properties dialog. If I understood you correctly you would like to add gdiScaling element automatically when "System Aware" option is selected, but that might have negative impact on some applications that use such setting. I am saying might because I don't have any particular example where it will fail, but if that setting would be completely compatible, then MS would not introduce additional flag, they would just apply enhanced scaling to all applications with corresponding dpiAware or dpiAwareness settings. Share this post Link to post
Tom Mueller 5 Posted April 24, 2019 (edited) 2 hours ago, Dalija Prasnikar said: Maybe, but this setting is merely a quick fix for seriously outdated applications. I am not sure how much sense it makes to add such support in IDE. I agree, but what means seriously outdated applications - all MDI applications and Delphi IDE? 😉 2 hours ago, Dalija Prasnikar said: If I understood you correctly you would like to add gdiScaling element automatically when "System Aware" option is selected, but that might have negative impact on some applications that use such setting. I am saying might because I don't have any particular example where it will fail, but if that setting would be completely compatible, then MS would not introduce additional flag, they would just apply enhanced scaling to all applications with corresponding dpiAware or dpiAwareness settings. No, it should be an additional item in the DPI awareness drop down box. I called it "System Aware (enhanced)" - but I see it makes it clearer if it is named "GDI Scaling". Delphis DPI Awareness modes and its Manifest entries would then look like (simplified): Edited April 24, 2019 by Tom Mueller 3 Share this post Link to post
Dalija Prasnikar 1396 Posted April 24, 2019 5 minutes ago, Tom Mueller said: I agree, but what means seriously outdated applications - all MDI applications and Delphi IDE? 😉 Well, MDI applications were deprecated a long time ago and Delphi IDE is seriously lagging behind in getting proper high DPI support. What I mean is that actively developed applications should be eventually updated to fully and properly support high dpi and not rely on this fix. I know, it takes time to do so... 5 minutes ago, Tom Mueller said: No, it should be an additional item in the DPI awareness drop down box. I called it "System (enhanced)" - but I see it makes it clearer if it is named "GDI Scaling". Delphis DPI Awareness modes and its Manifest entries would then look like (simplified): Now, it is much clearer. Can you please add that picture to your QP report. Share this post Link to post
Tom Mueller 5 Posted April 24, 2019 4 minutes ago, Dalija Prasnikar said: Well, MDI applications were deprecated a long time ago and Delphi IDE is seriously lagging behind in getting proper high DPI support. What I mean is that actively developed applications should be eventually updated to fully and properly support high dpi and not rely on this fix. I know, it takes time to do so... Yes, I agree - it would be the right way to update all applications to fully support high dpi. For our applications this will take probably 1-2 years and some money that our customers won't spend.. 9 minutes ago, Dalija Prasnikar said: Now, it is much clearer. Can you please add that picture to your QP report. I will do so. Thank you for comments! Share this post Link to post
Edwin Yip 154 Posted January 19, 2021 On 4/24/2019 at 9:12 PM, Tom Mueller said: Delphis DPI Awareness modes and its Manifest entries would then look like (simplified): This is a very well consolidated table! Care to share the source of the (excel?) file? Share this post Link to post
Anders Melander 1783 Posted January 19, 2021 1 hour ago, Edwin Yip said: This is a very well consolidated table! Yes it looks nice but the rules that are used by different versions of Windows to determine what DPI awareness and scaling to apply are much more complicated than what that table suggest. Trying to make a UI for editing the manifest has become a game of whac-a-mole. Share this post Link to post
Anders Melander 1783 Posted January 19, 2021 On 4/24/2019 at 3:35 PM, Dalija Prasnikar said: MDI applications were deprecated a long time ago Deprecated by whom? I don't think I've ever seen that claim backed by a first hand source. I think it's a bit like the claim that circulated about Win32 being deprecated which surfaced when .NET was released. Or about GDI when GDI+ was released. Share this post Link to post
David Heffernan 2345 Posted January 19, 2021 If you want to submit a feature request to Embarcadero, do so here: https://quality.embarcadero.com/ Share this post Link to post
David Heffernan 2345 Posted January 19, 2021 32 minutes ago, Anders Melander said: Deprecated by whom? I don't think I've ever seen that claim backed by a first hand source. I think it's a bit like the claim that circulated about Win32 being deprecated which surfaced when .NET was released. Or about GDI when GDI+ was released. Multiple Document Interface - Win32 apps | Microsoft Docs Quote Many new and intermediate users find it difficult to learn to use MDI applications. Therefore, you should consider other models for your user interface. However, you can use MDI for applications which do not easily fit into an existing model. In practice we can see that MS have not updated MDI for a very long time. The window chrome for MDI child windows does not match the latest style. I mean, this is MS, it's not going away any time soon. 1 Share this post Link to post
Dalija Prasnikar 1396 Posted January 19, 2021 41 minutes ago, Anders Melander said: Deprecated by whom? I don't think I've ever seen that claim backed by a first hand source. I think it's a bit like the claim that circulated about Win32 being deprecated which surfaced when .NET was released. Or about GDI when GDI+ was released. In addition to what @David Heffernan said https://docs.microsoft.com/en-us/cpp/mfc/sdi-and-mdi?view=msvc-160 Quote Under Windows 95 and later, applications are commonly SDI because the operating system has adopted a "document-centered" view. Share this post Link to post
Uwe Raabe 2057 Posted January 19, 2021 12 minutes ago, David Heffernan said: If you want to submit a feature request to Embarcadero In case you are referring to the GDI scaling: That is already available in 10.4.1 Manifest File (Windows Only) Share this post Link to post
Anders Melander 1783 Posted January 19, 2021 2 minutes ago, David Heffernan said: Quote Many new and intermediate users find it difficult to learn to use MDI applications. Therefore, you should consider other models for your user interface. However, you can use MDI for applications which do not easily fit into an existing model. In practice we can see that MS have not updated MDI for a very long time. The window chrome for MDI child windows does not match the latest style. Yes I'm aware that it's not recommended and of the limitations. My point was that claiming that it's deprecated is just FUD aimed at driving developers towards alternatives such as SDI. Ironically my experience with replacing MDI with SDI is that the users often find SDI confusing. They feel safe with MDI because they know where their windows are - they're always inside the MDI parent. I've tried with docked windows as a middle ground but that is far too advanced for some users. Share this post Link to post
Dalija Prasnikar 1396 Posted January 19, 2021 48 minutes ago, Anders Melander said: Yes I'm aware that it's not recommended and of the limitations. My point was that claiming that it's deprecated is just FUD aimed at driving developers towards alternatives such as SDI. You can call it whatever you like, but if the fact that MS didn't bother to update MDI window style to match their latest (now 5 years old) Windows 10 OS does not qualify as being deprecated, then I don't know what deprecated is. Also MS is spreading that FUD for the last 25 years... 1 Share this post Link to post
Anders Melander 1783 Posted January 19, 2021 (edited) 1 hour ago, Dalija Prasnikar said: You can call it whatever you like, but if the fact that MS didn't bother to update MDI window style to match their latest (now 5 years old) Windows 10 OS does not qualify as being deprecated, then I don't know what deprecated is. Also MS is spreading that FUD for the last 25 years... Not being a native English speaker I just looked up what "deprecated" actually means and it turns out that it's just what you describe: Discouragement of use. My bad. Edited January 19, 2021 by Anders Melander native English vs English native - oh dear 1 Share this post Link to post
Edwin Yip 154 Posted January 19, 2021 The following is a Microsoft article that explains GDI Scaling very well: https://blogs.windows.com/windowsdeveloper/2017/05/19/improving-high-dpi-experience-gdi-based-desktop-apps/ Share this post Link to post