From f008af1635909664533dd535bd568dd8bdf8633c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 14 Jul 2001 02:02:58 +0000 Subject: [PATCH] fixed setting/attaching menubar git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/frame.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(); -- 2.45.2