]> git.saurik.com Git - wxWidgets.git/commitdiff
MF_BYCOMMAND is zero so don't try to test it
authorJulian Smart <julian@anthemion.co.uk>
Sat, 2 Apr 2005 15:16:53 +0000 (15:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 2 Apr 2005 15:16:53 +0000 (15:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/menu.cpp

index 12dfbd7133c572d24df06440a4ebf6d3bc891da1..37d22056e1c8e76d9a193a35ae0d8209f12d972e 100644 (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;
 }