From 79f93d55353e923d6caed84a50fd052387745b4d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Dec 2014 22:19:16 +0000 Subject: [PATCH] No real changes, just make wxMenuBar::MSWGetMenu() const. There is no reason not to. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/menu.h | 4 ++-- src/msw/menu.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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.