Attach MDI "Window" menu to the parent frame menu bar in wxMSW.

This makes sense and fixes the regression with "Window" menu commands not
being processed any more after the changes of r71114.

Closes #14207.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-05-09 14:24:23 +00:00
parent 6e36db5eca
commit 679dc4e813

View File

@@ -317,13 +317,23 @@ void wxMDIParentFrame::RemoveMDIChild(wxMDIChildFrame * WXUNUSED(child))
void wxMDIParentFrame::AddWindowMenu() void wxMDIParentFrame::AddWindowMenu()
{ {
if ( m_windowMenu ) if ( m_windowMenu )
{
// For correct handling of the events from this menu we also must
// attach it to the menu bar.
m_windowMenu->Attach(GetMenuBar());
MDIInsertWindowMenu(GetClientWindow(), m_hMenu, GetMDIWindowMenu(this)); MDIInsertWindowMenu(GetClientWindow(), m_hMenu, GetMDIWindowMenu(this));
}
} }
void wxMDIParentFrame::RemoveWindowMenu() void wxMDIParentFrame::RemoveWindowMenu()
{ {
if ( m_windowMenu ) if ( m_windowMenu )
{
MDIRemoveWindowMenu(GetClientWindow(), m_hMenu); MDIRemoveWindowMenu(GetClientWindow(), m_hMenu);
m_windowMenu->Detach();
}
} }
void wxMDIParentFrame::UpdateWindowMenu(bool enable) void wxMDIParentFrame::UpdateWindowMenu(bool enable)