diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index b85873e9ad..56f009ab89 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -235,8 +235,8 @@ public: void Refresh( bool eraseBackground, const wxRect *rect = (const wxRect *) NULL ) { wxWindow::Refresh(eraseBackground, rect); } - // get the menu with given handle (recursively) - wxMenu* MSWGetMenu(WXHMENU hMenu); + // Get a top level or sub menu with given handle (recursively). + wxMenu* MSWGetMenu(WXHMENU hMenu) const; protected: // common part of all ctors diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index f27822dc49..3a9ecd594a 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -1629,8 +1629,7 @@ void wxMenuBar::Detach() wxMenuBarBase::Detach(); } -// get the menu with given handle (recursively) -wxMenu* wxMenuBar::MSWGetMenu(WXHMENU hMenu) +wxMenu* wxMenuBar::MSWGetMenu(WXHMENU hMenu) const { // If we're called with the handle of the menu bar itself, we can return // immediately as it certainly can't be the handle of one of our menus.