X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/294ea16de3359844cb884baad219b40ea04fac48..a83b5b74c365705144f9359d4527e4b2d073f569:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index d92e189b24..37d22056e1 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -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; } @@ -703,7 +704,7 @@ wxMenuBar::wxMenuBar(size_t count, wxMenu *menus[], const wxString titles[], lon m_titles.Alloc(count); - for ( int i = 0; i < count; i++ ) + for ( size_t i = 0; i < count; i++ ) { m_menus.Append(menus[i]); m_titles.Add(titles[i]);