IonicWind Software

Aurora Compiler => GUI => Topic started by: Parker on May 16, 2006, 05:41:42 PM

Title: MDI Client copies toolbar
Post by: Parker on May 16, 2006, 05:41:42 PM
How can I get this to stop happening? I have a flat toolbar and an MDI window that handles its sizing manually in OnSize (returning true). The picture demonstrates what I don't want, and I've tried using InvalidateWindow, SetSize, SendMessage(WM_SIZE), but nothing seems to work.
Title: Re: MDI Client copies toolbar
Post by: Ionic Wind Support Team on May 16, 2006, 06:09:46 PM
Have you looked at mdidemo.src?
Title: Re: MDI Client copies toolbar
Post by: Ionic Wind Support Team on May 16, 2006, 06:10:17 PM
Here is a hint:

   //return false for a frame window OnSize or the client won't be adjusted.

Title: Re: MDI Client copies toolbar
Post by: Ionic Wind Support Team on May 16, 2006, 06:11:48 PM
And in general, unless you have a speciific reason to not let Windows process the message as well, you should return false.  Exceptions are for messages like OnEraseBackground where you return true to prevent windows from drawing the background.

Title: Re: MDI Client copies toolbar
Post by: Parker on May 16, 2006, 06:42:07 PM
I used mdidemo.src as a starting point, but I'm returning true because otherwise the GUI library would cover things like an output window with the MDI Client area.

It works, but the first time the window is created/resized, the client area is in the wrong place and it takes some of the toolbar with it.

Edit - nevermind, moving the toolbar creation to main() fixes the problem... next time something like this occurs I'll make sure to put it in main before asking. I seem very GUI-library challenged today ::)
Title: Re: MDI Client copies toolbar
Post by: Ionic Wind Support Team on May 16, 2006, 06:58:52 PM
Got caught in OnCreate again?   The client window is created in a separate step from the frame window with a special windows class, which is registered by Windows.  So during the OnCreate call from the frame windoe the client has not been initialized yet.