DeleteMenu function user32

Win32Result<bool> DeleteMenu(
  1. HMENU hMenu,
  2. int uPosition,
  3. MENU_ITEM_FLAGS uFlags
)

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.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-deletemenu.

Implementation

Win32Result<bool> DeleteMenu(
  HMENU hMenu,
  int uPosition,
  MENU_ITEM_FLAGS uFlags,
) {
  final result_ = DeleteMenu_Wrapper(hMenu, uPosition, uFlags);
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}