X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47ca6bfb051e90c745812a4f93f38b680f796942..f0c5ebdc0d881e5478f166bab335265460409ec9:/src/msw/mdi.cpp diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 8ce7cfc8e9..0250f4c389 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1089,10 +1089,14 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect) if (!pChild || (pChild == this)) { HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow()); - DWORD dwStyle = ::GetWindowLong(hwndClient, GWL_STYLE); - DWORD dwThisStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE); + DWORD dwStyle = ::GetWindowLong(hwndClient, GWL_EXSTYLE); + + // we want to test whether there is a maximized child, so just set + // dwThisStyle to 0 if there is no child at all + DWORD dwThisStyle = pChild + ? ::GetWindowLong(GetWinHwnd(pChild), GWL_STYLE) : NULL; DWORD dwNewStyle = dwStyle; - if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE)) + if ( dwThisStyle & WS_MAXIMIZE ) dwNewStyle &= ~(WS_EX_CLIENTEDGE); else dwNewStyle |= WS_EX_CLIENTEDGE; @@ -1136,7 +1140,7 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) ccs.hWindowMenu = (HMENU) parent->GetWindowMenu()->GetHMenu(); ccs.idFirstChild = wxFIRST_MDI_CHILD; - DWORD msStyle = WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN; + DWORD msStyle = MDIS_ALLCHILDSTYLES | WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN; if ( style & wxHSCROLL ) msStyle |= WS_HSCROLL; if ( style & wxVSCROLL )