X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6beb85c0d32d2bca8520feb7e100a6f612720a53..ef70f0ecdbc4268923e132b257c95e8a2525f4ca:/src/msw/frame.cpp diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index ee461db1be..6df2977bb5 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -481,7 +481,7 @@ void wxFrameMSW::PositionStatusBar() void wxFrameMSW::AttachMenuBar(wxMenuBar *menubar) { - m_frameMenuBar = menubar; + wxFrameBase::AttachMenuBar(menubar); if ( !menubar ) { @@ -496,15 +496,15 @@ void wxFrameMSW::AttachMenuBar(wxMenuBar *menubar) { m_hMenu = menubar->GetHMenu(); } - else + else // no HMENU yet { - if ( menubar->IsAttached() ) - menubar->Detach(); - m_hMenu = menubar->Create(); if ( !m_hMenu ) + { + wxFAIL_MSG( _T("failed to create menu bar") ); return; + } } InternalSetMenuBar();