diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 0a56d318de..b85873e9ad 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -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(); diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 68422010cd..f27822dc49 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -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;