diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index a5bdff00cb..dde5cc7e37 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -191,6 +191,7 @@ protected: private: bool m_needsInitialShow; // Show must be called in idle time after Creation bool m_needsResize; // flag which tells us to artificially resize the frame + virtual void DetachMenuBar() ; DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame) diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 46c4a0fc35..0dce669ebf 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -850,6 +850,12 @@ void wxMDIChildFrame::InternalSetMenuBar() parent->m_parentFrameActive = false; } +void wxMDIChildFrame::DetachMenuBar() +{ + RemoveWindowMenu(NULL, m_hMenu); + wxFrame::DetachMenuBar(); +} + WXHICON wxMDIChildFrame::GetDefaultIcon() const { // we don't have any standard icons (any more) @@ -1377,11 +1383,6 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu) continue; } - if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Window")) ) - { - success = true; - break; - } if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Help")) ) {