May 21, 2024, 03:10:00 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


MDI Client copies toolbar

Started by Parker, May 16, 2006, 05:41:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

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.

Ionic Wind Support Team

Have you looked at mdidemo.src?
Ionic Wind Support Team

Ionic Wind Support Team

Here is a hint:

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

Ionic Wind Support Team

Ionic Wind Support Team

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.

Ionic Wind Support Team

Parker

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 ::)

Ionic Wind Support Team

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.

Ionic Wind Support Team