We incorrectly passed the sign-extended int id to ::GetMenuState() function
that expects an unsigned WORD id, so it never found the item if the WORD id
had the high bit set. Fix this by correctly passing the unsigned id to it.
Closes #11644.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69099
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// get the status of the menu item: note that it has been just changed
// by Toggle() above so here we already get the new state of the item
- UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND);
+ //
+ // Also notice that we must pass unsigned id_ and not sign-extended id
+ // to ::GetMenuState() as this is what it expects.
+ UINT menuState = ::GetMenuState(GetHmenu(), id_, MF_BYCOMMAND);
SendEvent(id, menuState & MF_CHECKED);
}