SetMenuItemBitmaps function user32

Win32Result<bool> SetMenuItemBitmaps(
  1. HMENU hMenu,
  2. int uPosition,
  3. MENU_ITEM_FLAGS uFlags,
  4. HBITMAP? hBitmapUnchecked,
  5. HBITMAP? hBitmapChecked,
)

Associates the specified bitmap with a menu item.

Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

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

Implementation

Win32Result<bool> SetMenuItemBitmaps(
  HMENU hMenu,
  int uPosition,
  MENU_ITEM_FLAGS uFlags,
  HBITMAP? hBitmapUnchecked,
  HBITMAP? hBitmapChecked,
) {
  final result_ = SetMenuItemBitmaps_Wrapper(
    hMenu,
    uPosition,
    uFlags,
    hBitmapUnchecked ?? nullptr,
    hBitmapChecked ?? nullptr,
  );
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}