Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
A version of this page is also available for
4/8/2010
This function deletes an item from the specified menu. If the menu item invokes a pop-up menu, DeleteMenudestroys the handle to the pop-up menu and frees the memory used by the pop-up menu.
Syntax
BOOL DeleteMenu( HMENU hMenu, UINT uPosition, UINT uFlags ); |
Parameters
- hMenu
-
[in] Handle to the menu to be changed.
- uPosition
-
[in] The menu item to be deleted, as determined by the uFlagsparameter.
- uFlags
-
[in] Constant specifying how the uPositionparameter is interpreted. This parameter must be either the MF_BYCOMMAND or the MF_BYPOSITION constant. For more information, see Menus Constants.
Return Value
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
The application must call the DrawMenuBarfunction whenever a menu changes, whether or not the menu is in a displayed window.
Requirements
Header | winuser.h |
Library | Menu.lib |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |