From a967ef9dcefdb23a73ab389b5749fe1e17bedc5b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 26 Feb 2001 10:24:24 +0000 Subject: [PATCH] applied patch 403988 (fixing MDI window menu) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/mdi.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 0250f4c389..8a43fa947c 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() ) { @@ -1260,6 +1260,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 +1307,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 +1320,6 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu) if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Window")) ) { - success = TRUE; ::RemoveMenu(hmenu, i, MF_BYPOSITION); break; } -- 2.45.2