From bc88602a653c5ac9c7a3307d6f52a7ae0e572b41 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 23 Oct 2005 11:05:46 +0000 Subject: [PATCH] Patch [ 1314868 ] [wxMSW] Show MDI child menubars when ShowFullScreen(false) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/frame.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index c1904ead5c..69248ea9d6 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -518,8 +518,27 @@ bool wxFrame::ShowFullScreen(bool show, long style) } #endif // wxUSE_TOOLBAR - if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && m_hMenu) - ::SetMenu(GetHwnd(), (HMENU)m_hMenu); + if (m_fsStyle & wxFULLSCREEN_NOMENUBAR) + { + WXHMENU menu = m_hMenu; + +#if wxUSE_MDI_ARCHITECTURE + wxMDIParentFrame *frame = wxDynamicCast(this, wxMDIParentFrame); + if (frame) + { + wxMDIChildFrame *child = frame->GetActiveChild(); + if (child) + { + menu = child->GetWinMenu(); + } + } +#endif // wxUSE_MDI_ARCHITECTURE + + if (menu) + { + ::SetMenu(GetHwnd(), (HMENU)menu); + } + } #if wxUSE_STATUSBAR wxStatusBar *theStatusBar = GetStatusBar(); @@ -954,7 +973,7 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara SHACTIVATEINFO* info = (SHACTIVATEINFO*) m_activateInfo; if (info) SHHandleWMActivate(GetHwnd(), wParam, lParam, info, FALSE); - + // This implicitly sends a wxEVT_ACTIVATE_APP event if (wxTheApp) wxTheApp->SetActive(wParam != 0, FindFocus());