BOOL RemoveMenu(hmenu, idItem, fuFlags) | |||||
HMENU hmenu; | /* handle of menu, */ | ||||
UINT idItem; | /* menu item to delete | */ | |||
UINT fuFlags; | /* menu flags, */ |
The RemoveMenu function deletes a menu item with an associated pop-up menu from a menu but does not destroy the handle of the pop-up menu, allowing the menu to be reused. Before calling this function, an application should call the GetSubMenu function to retrieve the pop-up menu handle.
hmenu
Identifies the menu to be changed.
idItem
Specifies the menu item to be removed, as determined by the fuFlags parameter.
fuFlags
Specifies how the idItem parameter is to be interpreted. This parameter can be one of the following values:
Value | Meaning |
MF_BYCOMMAND | The idItem parameter specifies the menu-item identifier. |
MF_BYPOSITION | The idItem parameter specifies the zero-based position of the menu item. |
The return value is nonzero if the function is successful. Otherwise it is zero.
Whenever a menu changes (whether or not it is in a window that is displayed), the application should call the DrawMenuBar function.
AppendMenu, CreateMenu, DeleteMenu, DrawMenuBar, GetSubMenu, InsertMenu