fixed setting/attaching menubar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user