MDI child windows use hard-coded Visual Style Rendering

MDI child windows use hard-coded Visual Style Rendering

Postby Silvio.Falconi » Thu May 19, 2022 9:08 am

1. Create an MDI container as the main application window (typical). (Set IsMDIContainer to true)
2. Via code, add MDI child window using the standard way (create, set MDIParent to "this", then Show).


Secondary windows are always displayed in Windows 7 Aero style, regardless of the operating system, theme, or user preferences.

Some customers to whom I sent the updated application (in many cases only recompiled with the new version of fwh) and I forced to install Win10, complained that our applications do not look modern because they have a main window and dialogs on win10 and child windows look 10 years old with win7 style

I have asked to Antonio Linares and it seems that no reasonable solution is available.



Image









There are several reports of the problem online, and there are no confirmed workarounds.


On these days , I asked several Vb, C ++, Delphi and Phyton programming forums at first I got this message


From VbForum
I would point out that on certain operating systems like Windows Server 2012, the issue doesn't exist. So it's also a bug that randomly manifests depending on the version of Windows.


From VbForum
The issue occurs on Windows 10, Windows Server 2016, AND Windows 8.1 (Your Win 8.1 screen shot appears to be from an installation that has had all UI styling turned off). In my tests, only Windows Server 2012 painted it according to the OS themes correctly. See attached screens.



Windows 8.1 Enterprise with Update (child windows incorrectly use Win7 styling)

Image



Windows Server 2016 (Child windows incorrectly use Win7 styling)

Image



Windows 10 (Child windows incorrectly use Win7 styling)

Image



Windows Server 2012 (Child window is styled consistently with other windows)

Image



So as you can see, the bug is that the MDI Child windows do not paint according to the OS/Theme styles. They always paint in the Windows 7 Aero style regardless of the actual settings (except on Windows Server 2012). Normal (non-MDIChild) windows paint correctly as do the system windows like MessageBox, so you end up with a UI that has a mix of old and correct styling
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: MDI child windows use hard-coded Visual Style Rendering

Postby Silvio.Falconi » Thu May 19, 2022 9:28 am

on Microsoft forum I saw this message ( Microsoft Q&A. )


Code: Select all  Expand view
Have you try to comment out the line :SetDefaultManager(...) in :OnCreate() function in MainFrm.cpp?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests