PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Wilko Verweij on February 17, 2012, 05:13:40 AM

Title: MDI with statusbar and/or toolbar
Post by: Wilko Verweij on February 17, 2012, 05:13:40 AM
Hi all, recently I had problems with an MDI-form with toolbar and statusbar. All of a sudden the color of the status bar changed into the MDI-background color, even though I did not change anything in the statusbar at that time (first Figure). I could not solve that!
I decided to start from scratch. Everything worked fine until I inserted the toolbar. The toolbar color was not displayed correctly (see second figure).
I wonder if the code for determing the MDI-background area is always generated correctly by FF. Or maybe I am doing something wrong? Any suggestions?
Wilko
Title: Re: MDI with statusbar and/or toolbar
Post by: Paul Squires on February 17, 2012, 07:58:37 PM
Hard to know for sure, but the first picture looks like the AutoSizeClient property is set to False (and you are not then handling the WM_SIZE of the client window yourself).

The second picture looks like you may be using the AutoSizeClient property is set to False and the TBSTYLE_LIST style of the Toolbar is checked.

Maybe you can email me the project so I can see exactly what is going on?
Title: Re: MDI with statusbar and/or toolbar
Post by: Paul Squires on February 19, 2012, 07:28:03 PM
Wilko sent me his sample project. He forgot to use an MDI Form as the main form. Once he started using the correct MDI forms then things worked correctly.

However, it is important to note that the background color of a normal Form's dialog will show through the toolbar when the TBSTYLE_FLAT is set. That's why the dark gray was showing through the toolbar in his screenshots.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb760439(v=vs.85).aspx

http://www.ureader.com/msg/148428.aspx
Title: Re: MDI with statusbar and/or toolbar
Post by: Wilko Verweij on February 20, 2012, 05:10:25 PM
Note that if you have an MDI-form you are able to set the Flat-style without problems. Still not sure what happened with the statusbar in the first example.