MM_REMOVEITEM
Appearance
This message removes a menu item.
Syntax
param1 USHORT usitem; /* Item identifier. */ USHORT usincludesubmenus; /* Include submenus indicator. */ param2 ULONG ulReserved; /* Reserved value, should be 0. */
Parameters
- usitem (USHORT) - input
- Item identifier.
- 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 an item with the specified identifier
- and delete it.
- FALSE: If the menu does not have an item with the specified identifier, do not
- search the submenus and subdialogs of the menu for an 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
- sItemsLeft (SHORT) - return
- Count of remaining items.
Remarks
The menu control window procedure responds to this message by removing the identified item from the menu and setting sItemsLeft to the count of items in the menu after the item is deleted.
The difference between this message and MM_DELETEITEM is that MM_DELETEITEM destroys any submenu window, and deletes any bit map associated with the item, whereas MM_REMOVEITEM does not.
Note: It must be sent, not posted, to the menu control.
Default Processing
The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set sItemsLeft to the default value of 0.