From: Vadim Zeitlin Date: Wed, 11 Aug 1999 22:54:28 +0000 (+0000) Subject: wxMenuBar::IsEnabled() now returns TRUE sometimes too X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1a5e297c6b5b745afee30caf430ce62e9519a181 wxMenuBar::IsEnabled() now returns TRUE sometimes too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 019415a9e8..87c892530b 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -778,7 +778,8 @@ bool wxMenuBar::IsEnabled(int id) const int flag = ::GetMenuState(GetHmenuOf(itemMenu), id, MF_BYCOMMAND) ; - return (flag & MF_ENABLED) != 0; + // don't "and" with MF_ENABLED because its value is 0 + return (flag & MF_DISABLED) == 0; } void wxMenuBar::SetLabel(int id, const wxString& label)