Article ID: 121623
Article Last Modified on 7/11/2005
case WM_MENUCHAR:
nIndex = Determine index of menu item to be selected from
character that was typed and handle of the current
menu.
return MAKELRESULT(nIndex, 2);
The 2 in the high-order word of the return value informs Windows that
the low-order word of the return value contains the zero-based index
of the menu item to be selected by Windows.
Constant Value Meaning
---------------------------
MNC_IGNORE 0 Informs Windows that it should discard the character
the user pressed and create a short beep on the system
speaker.
MNC_CLOSE 1 Informs Windows that it should close the active menu.
MNC_EXECUTE 2 Informs Windows that it should choose the item
specified in the low-order word of the return value.
The owner window receives a WM_COMMAND message.
MNC_SELECT 3 Informs Windows that it should select the item
specified in the low-order word of the return value.
Keywords: kbhowto kbmenu KB121623