MM_QUERYSELITEMID
Appearance
This message returns the identity of the selected menu item.
Syntax
param1 USHORT usReserve; /* Reserved value, should be 0. */ USHORT usincludesubmenus; /* Include submenus indicator. */ param2 ULONG ulReserved; /* Reserved value, should be 0. */
Parameters
- usReserve (USHORT) - input
- Reserved value, should be 0.
- usincludesubmenus (USHORT) - input
- Include submenus indicator.
- TRUE: If the menu does not have an item with the specified identifier, search
- the submenus and subdialogs of the menu for a selected item with the specified
- identifier.
- FALSE: If the menu does not have an item with the specified identifier, do not
- search the submenus and subdialogs of the menu for a selected item with the specified
- identifier.
- TRUE: If the menu does not have an item with the specified identifier, search
- ulReserved (ULONG) - input
- Reserved value, should be 0.
Returns
- sresult (SHORT) - return
- Selected item identifier.
- MID_ERROR: Error occurred.
- MIT_NONE: No item selected.
- Other: Selected item identifier.
Remarks
The menu control window procedure responds to this message by returning the identity of the selected item in the menu. Submenus and subdialogs are not searched unless usincludesubmenus is set to TRUE.
Default Processing
The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set sresult to the default value of 0.