summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a152561)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31671
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id)
{
// ignore commands from the menu title
bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id)
{
// ignore commands from the menu title
-
- // NB: VC++ generates wrong assembler for `if ( id != idMenuTitle )'!!
if ( id != (WXWORD)idMenuTitle )
{
if ( id != (WXWORD)idMenuTitle )
{
- // VZ: previosuly, the command int was set to id too which was quite
- // useless anyhow (as it could be retrieved using GetId()) and
- // uncompatible with wxGTK, so now we use the command int instead
- // to pass the checked status
- UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND) ;
- SendEvent(id, menuState & MF_CHECKED);
+ // get the checked status of the command: notice that menuState is the
+ // old state of the menu, so the test for MF_CHECKED must be inversed
+ UINT menuState = ::GetMenuState(GetHmenu(), id, MF_BYCOMMAND);
+ SendEvent(id, !(menuState & MF_CHECKED));