MDI with statusbar and/or toolbar

Started by Wilko Verweij, February 17, 2012, 05:13:40 AM

Previous topic - Next topic

Wilko Verweij

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

Paul Squires

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?
Paul Squires
PlanetSquires Software

Paul Squires

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
Paul Squires
PlanetSquires Software

Wilko Verweij

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.