Deletes an item from the specified menu. If the menu item opens a menu or submenu, this function destroys the handle to the menu or submenu and frees the memory used by the menu or submenu.
Programmatically removing submenus from VFP main menu
BOOL WINAPI DeleteMenu(
__in HMENU hMenu,
__in UINT uPosition,
__in UINT uFlags
);
DECLARE INTEGER DeleteMenu IN user32;
INTEGER hMenu,;
INTEGER uPosition,;
INTEGER uFlags
hMenu [in] HMENU A handle to the menu to be changed.
uPosition [in] UINT The menu item to be deleted, as determined by the uFlags parameter.
uFlags [in] UINT Indicates how the uPosition parameter is interpreted: MF_BYCOMMAND (0), MF_BYPOSITION (0x0400)
If the function succeeds, the return value is nonzero.
See also: RemoveMenu, DestroyMenu, GetMenu.
If you are not into Windows API yet, get yourself a cup of coffee or a drink and start musing about possible functional differences of three Menu API functions with somewhat close names:
- RemoveMenu
- DeleteMenu
- DestroyMenu