MF_BYCOMMAND is zero so don't try to test it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-04-02 15:16:53 +00:00
parent 2b9a7d4cc2
commit 3519d94676

View File

@ -106,7 +106,8 @@ UINT GetMenuState(HMENU hMenu, UINT id, UINT flags)
wxZeroMemory(info);
info.cbSize = sizeof(info);
info.fMask = MIIM_STATE;
if ( !::GetMenuItemInfo(hMenu, id, flags & MF_BYCOMMAND ? FALSE : TRUE, & info) )
// MF_BYCOMMAND is zero so test MF_BYPOSITION
if ( !::GetMenuItemInfo(hMenu, id, flags & MF_BYPOSITION ? TRUE : FALSE , & info) )
wxLogLastError(wxT("GetMenuItemInfo"));
return info.fState;
}