zertovitch / gwindows

GWindows: GUI framework for MS Windows
https://sf.net/projects/gnavi/
21 stars 5 forks source link

Fix MDI child windows appearance when not expanded. #35

Closed NicoPy closed 5 months ago

NicoPy commented 5 months ago

With the current MDI child windows display glitch removal algorithm, when child windows are not expanded, switching between windows with MDI system menu or with tabs it is impossible to know which window has the focus. They are all shown as focused. This PR fixes this issue. For this, the algorithm is used only when child windows are expanded, else the default windowproc is used. However, there is a corner case when a child window is created. To fix it, in GWindows.Windows, function Create_MDI_Child, CreateWindowEx is replaced by the recommended WM_MDICREATE message. This message is caught in the MDI client windowproc.