diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index e9ae4e95de..8c2e7c1c9c 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -1272,7 +1272,7 @@ int wxMenuItem::MSGetMenuItemPos() const if ( state & MF_POPUP ) { - if ( ::GetSubMenu(hMenu, i) == (HMENU)id ) + if ( ::GetSubMenu(hMenu, i) == (HMENU)wxUIntToPtr(id) ) return i; } else if ( !(state & MF_SEPARATOR) )