MDI windows, MDIClient and mdiclient
Cenedese at indel.ch
Mon Oct 20 04:13:45 CDT 2003
I hope I'm not stating the obvious here, I'm just trying to help.
>I'm trying to find my way around the MDI setting, and phrase a regression test. However, I cannot seem to create the exact same circumstances. When looking at the original app using Spy++, I see that the application has a window from the very start of the app (long before it sends WM_MDICREATE), which does not appear to have WS_EX_MDICHILD set, but which has a child window of class "MDIClient".
>Running the same app in Wine using --debugmsg +win,+class, I can see that it asks to open a window of class "mdiclient". I do not, however, see anywhere that such a class was ever registered! Furthermore - the call succeeds.
>Can anyone enlighten me? Is this window necessary whenever an MDI is present? If so, what function do I use on the parent window to tell it that it is to be an MDI container?
The MDIClient is the window which will hold all the child windows. It's the
dark background in the empty MDI app. That's the main difference between
an SDI and MDI app. The MDIClient takes care of messages such as MDICreate,
MDITile, MDINext (from CTRL-TAB) and such.
In our application we can dock various tools to the borders of the main window.
The MDIClient is then resized to the remaining visible part so a maximized
child window will have the right size (and will not be overlapped by the docked
tool). Actually I don't know if this is normal or just in our application :)
In the Create function is this:
dwStyle |= WS_VISIBLE | WS_CHILD | WS_BORDER | WS_CLIPCHILDREN | WS_CLIPSIBLINGS|MDIS_ALLCHILDSTYLES; // allow children to be created invisible
ccs.hWindowMenu = pMenu->GetSafeHmenu();
ccs.idFirstChild = AFX_IDM_FIRST_MDICHILD;
// Create MDICLIENT
if (!CreateEx(dwExStyle, _T("mdiclient"), NULL, dwStyle, rect.left...
More information about the wine-devel