InsertMenuItem function user32
Inserts a new menu item at the specified position in a menu.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-insertmenuitemw.
Implementation
Win32Result<bool> InsertMenuItem(
HMENU hmenu,
int item,
bool fByPosition,
Pointer<MENUITEMINFO> lpmi,
) {
final result_ = InsertMenuItemW_Wrapper(
hmenu,
item,
fByPosition ? TRUE : FALSE,
lpmi,
);
return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}