X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0ded96ffb8bd0af29e269529d00603cd3964f94..abe5726aff7744e67c81f8dd6a2116dab0ec9a53:/src/msw/mdi.cpp?ds=sidebyside diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 0250f4c389..e3db308a0f 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: MDI classes +// Name: src/msw/mdi.cpp +// Purpose: MDI classes for wxMSW // Author: Julian Smart // Modified by: // Created: 04/01/98 @@ -304,7 +304,7 @@ void wxMDIParentFrame::SetWindowMenu(wxMenu* menu) } } -void wxMDIParentFrame::OnSize(wxSizeEvent& event) +void wxMDIParentFrame::OnSize(wxSizeEvent&) { if ( GetClientWindow() ) { @@ -722,6 +722,15 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, //SetWindowLong(GetHwnd(), 0, (long)this); wxModelessWindows.Append(this); + + // Necessary to make ResetWindowStyle() work + // and will be called eventually anyway + Activate(); + + // Without this, a maximized child will still + // a double border around the child + ResetWindowStyle((void *)NULL); // Set the Client ExStyle right + return TRUE; } @@ -1260,6 +1269,7 @@ static void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow) wxWindow *parent = win->GetParent(); wxCHECK_RET( parent, wxT("MDI client without parent frame? weird...") ); + ::SendMessage(GetWinHwnd(win), WM_MDIREFRESHMENU, 0, 0L); ::DrawMenuBar(GetWinHwnd(parent)); } @@ -1306,7 +1316,6 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu) // Try to insert Window menu in front of Help, otherwise append it. HMENU hmenu = (HMENU)menu; int N = GetMenuItemCount(hmenu); - bool success = FALSE; for ( int i = 0; i < N; i++ ) { wxChar buf[256]; @@ -1320,7 +1329,6 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu) if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Window")) ) { - success = TRUE; ::RemoveMenu(hmenu, i, MF_BYPOSITION); break; }