wxMenuBar::IsEnabled() now returns TRUE sometimes too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-08-11 22:54:28 +00:00
parent 48b1d0ff4f
commit 1a5e297c6b

View File

@ -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)