DeleteMenufunction
Deletes a menu or detaches a submenu from the specified menu.
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.
Syntax
FUNCTION DeleteMenu (BYVAL hMenu AS HMENU, BYVAL uPosition AS DWORD, BYVAL fByPosition AS BOOLEAN = FALSE) AS BOOLEAN
Also documented as
RemoveMenu — one description covers them all.Parameters
| Name | Description | |
|---|---|---|
hMenu | Handle to the menu that contains the menu item. | |
uPosition | The identifier or position of the menu to delete. The meaning of this parameter depends on the value of fByPosition. | |
fByPosition | The meaning of uPosition. If this parameter is FALSE, uPosition is a menu item identifier. Otherwise, it is a menu item position, where position = 0 for the first position, position = 1 for the second, and so on. |
Return value
Returns TRUE if the function succeeds; FALSE otherwise.
Description
Deletes a menu or detaches a submenu from the specified menu. DeleteItem can also be used to delete menus.
Remarks
To remove menus use always the position and to remove drop-down menus use the identifier.
Example
CMenu.DeleteMenu(hMenu, 1, TRUE) ' Removes the second menu (zero-based position) CMenu.DeleteMenu(hMenu, IDM_POPUP) ' Removes the popup menu with the IDM_POPUP identifier
Reference
- Documented in Windows/WIndows Controls/CMenu Class.md
- Topic: About Menus