Allow compiling with wxUSE_OWNER_DRAW==0. This fixes another problem in
Windows CE build where owner drawn menus are not supported.
Closes #13851.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70316
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
GetMenuBar()->RebuildAccelTable();
}
GetMenuBar()->RebuildAccelTable();
}
}
//else: it is a separator, they can't have accels, nothing to do
}
}
//else: it is a separator, they can't have accels, nothing to do
}
#if wxUSE_IMAGE
if ( wxGetWinVersion() >= wxWinVersion_Vista )
{
#if wxUSE_IMAGE
if ( wxGetWinVersion() >= wxWinVersion_Vista )
{
wxBitmap bmp = pItem->GetBitmap(checked);
if ( bmp.IsOk() )
{
wxBitmap bmp = pItem->GetBitmap(checked);
if ( bmp.IsOk() )
{
return GetHbitmapOf(pItem->GetBitmap(checked));
}
return GetHbitmapOf(pItem->GetBitmap(checked));
}
+#endif // wxUSE_OWNER_DRAW
//else: bitmap is not set
return NULL;
//else: bitmap is not set
return NULL;
}
//else: this item doesn't have an accel, nothing to do
#endif // wxUSE_ACCEL
}
//else: this item doesn't have an accel, nothing to do
#endif // wxUSE_ACCEL
}
// get the menu with given handle (recursively)
}
// get the menu with given handle (recursively)
wxMenu* wxMenu::MSWGetMenu(WXHMENU hMenu)
{
// check self
wxMenu* wxMenu::MSWGetMenu(WXHMENU hMenu)
{
// check self
// unknown hMenu
return NULL;
}
// unknown hMenu
return NULL;
}
+#endif // wxUSE_OWNER_DRAW
// ---------------------------------------------------------------------------
// Menu Bar
// ---------------------------------------------------------------------------
// Menu Bar
wxCHECK_MSG( GetHMenu() != hMenu, NULL,
wxT("wxMenuBar::MSWGetMenu(): menu handle is wxMenuBar, not wxMenu") );
wxCHECK_MSG( GetHMenu() != hMenu, NULL,
wxT("wxMenuBar::MSWGetMenu(): menu handle is wxMenuBar, not wxMenu") );
// query all menus
for ( size_t n = 0 ; n < GetMenuCount(); ++n )
{
// query all menus
for ( size_t n = 0 ; n < GetMenuCount(); ++n )
{
if ( menu )
return menu;
}
if ( menu )
return menu;
}
// unknown hMenu
return NULL;
// unknown hMenu
return NULL;