RemoveMenu function user32

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

Deletes a menu item or detaches a submenu from the specified menu.

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

Implementation

Win32Result<bool> RemoveMenu(
  HMENU hMenu,
  int uPosition,
  MENU_ITEM_FLAGS uFlags,
) {
  resolveGetLastError();
  final result_ = _RemoveMenu(hMenu, uPosition, uFlags);
  return .new(value: result_ != FALSE, error: GetLastError());
}