---
name: "al_set_menu_item_icon"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_set_menu_item_icon/3alleg5"
---

# al\_set\_menu\_item\_icon(3alleg5)

Allegro 5 API

## NAME

al\_set\_menu\_item\_icon - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_native_dialog.h>
  void al_set_menu_item_icon(ALLEGRO_MENU *menu, int pos, ALLEGRO_BITMAP *icon)
  ```

## DESCRIPTION

Sets the icon for the specified menu item. The menu assumes ownership of the `ALLEGRO_BITMAP` and may invalidate the pointer, so you must clone it if you wish to continue using it.

If a video bitmap is passed, it will automatically be converted to a memory bitmap, so it is preferable to pass a memory bitmap.

## SINCE

5\.1.0

## SEE ALSO

al\_get\_menu\_item\_icon(3alleg5), al\_clone\_bitmap(3alleg5)
