X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c50f1fb9226d9260454ccb9c8a67d0be23c2827f..50bcd1ae77ba4953d62c9141a78a36b5f4b57936:/src/msw/mdi.cpp diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 551c1cc4ec..381c6d0456 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -192,10 +192,8 @@ bool wxMDIParentFrame::Create(wxWindow *parent, if (style & wxCAPTION) msflags |= WS_CAPTION; - // Adding WS_CLIPCHILDREN causes children not to be properly - // drawn when first displaying them. -// if (style & wxCLIP_CHILDREN) -// msflags |= WS_CLIPCHILDREN; + if (style & wxCLIP_CHILDREN) + msflags |= WS_CLIPCHILDREN; wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height, msflags); @@ -383,9 +381,9 @@ long wxMDIParentFrame::MSWWindowProc(WXUINT message, break; case WM_SIZE: - // we will leave this message to the base class version, but we - // must pass it to DefFrameProc() too - MSWDefWindowProc(message, wParam, lParam); + // as we don't (usually) resize the MDI client to exactly fit the + // client area (we put it below the toolbar, above statusbar &c), + // we should not pass this one to DefFrameProc break; } @@ -729,25 +727,35 @@ void wxMDIChildFrame::InternalSetMenuBar() // MDI operations // --------------------------------------------------------------------------- -void wxMDIChildFrame::Maximize() +void wxMDIChildFrame::Maximize(bool maximize) { wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); if ( parent && parent->GetClientWindow() ) - ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIMAXIMIZE, (WPARAM) GetHwnd(), 0); + { + ::SendMessage(GetWinHwnd(parent->GetClientWindow()), + maximize ? WM_MDIMAXIMIZE : WM_MDIRESTORE, + (WPARAM)GetHwnd(), 0); + } } void wxMDIChildFrame::Restore() { wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); if ( parent && parent->GetClientWindow() ) - ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIRESTORE, (WPARAM) GetHwnd(), 0); + { + ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIRESTORE, + (WPARAM) GetHwnd(), 0); + } } void wxMDIChildFrame::Activate() { wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); if ( parent && parent->GetClientWindow() ) - ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIACTIVATE, (WPARAM) GetHwnd(), 0); + { + ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIACTIVATE, + (WPARAM) GetHwnd(), 0); + } } // ---------------------------------------------------------------------------