Don't put wxMenu::MSWGetMenu() inside wxUSE_OWNER_DRAWN check.
This doesn't make any sense, this function is not related to the owner drawing code at all and should always be available. This corrects the changes of r70316, see #13851. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,6 +102,9 @@ public:
|
||||
wxAcceleratorTable *CreateAccelTable() const;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
// get the menu with given handle (recursively)
|
||||
wxMenu* MSWGetMenu(WXHMENU hMenu);
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
|
||||
int GetMaxAccelWidth()
|
||||
@@ -116,9 +119,6 @@ public:
|
||||
m_maxAccelWidth = -1;
|
||||
}
|
||||
|
||||
// get the menu with given handle (recursively)
|
||||
wxMenu* MSWGetMenu(WXHMENU hMenu);
|
||||
|
||||
private:
|
||||
void CalculateMaxAccelWidth();
|
||||
|
||||
|
@@ -989,7 +989,6 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id_)
|
||||
}
|
||||
|
||||
// get the menu with given handle (recursively)
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
wxMenu* wxMenu::MSWGetMenu(WXHMENU hMenu)
|
||||
{
|
||||
// check self
|
||||
@@ -1012,7 +1011,6 @@ wxMenu* wxMenu::MSWGetMenu(WXHMENU hMenu)
|
||||
// unknown hMenu
|
||||
return NULL;
|
||||
}
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Menu Bar
|
||||
@@ -1639,7 +1637,6 @@ wxMenu* wxMenuBar::MSWGetMenu(WXHMENU hMenu)
|
||||
if ( hMenu == GetHMenu() )
|
||||
return NULL;
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
// query all menus
|
||||
for ( size_t n = 0 ; n < GetMenuCount(); ++n )
|
||||
{
|
||||
@@ -1647,7 +1644,6 @@ wxMenu* wxMenuBar::MSWGetMenu(WXHMENU hMenu)
|
||||
if ( menu )
|
||||
return menu;
|
||||
}
|
||||
#endif
|
||||
|
||||
// unknown hMenu
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user