---
name: "set_mouse_cursor_bitmap"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/set_mouse_cursor_bitmap"
---

# set\_mouse\_cursor\_bitmap(3alleg)

Changes the image Allegro uses for mouse cursors.

## NAME

set\_mouse\_cursor\_bitmap - Changes the image Allegro uses for mouse cursors.

## SYNOPSIS

**#include \<allegro.h\>**

**void set\_mouse\_cursor\_bitmap(int cursor, BITMAP \*bmp);**

## DESCRIPTION

This function changes the cursor image Allegro uses if select\_mouse\_cursor() is called but no native operating system cursor can be used, e.g. because you did not call enable\_hardware\_cursor().

The cursor argument can be one of:

**MOUSE\_CURSOR\_ALLEGRO** **MOUSE\_CURSOR\_ARROW** **MOUSE\_CURSOR\_BUSY** **MOUSE\_CURSOR\_QUESTION** **MOUSE\_CURSOR\_EDIT**

but not MOUSE\_CURSOR\_NONE.

The bmp argument can either point to a valid bitmap or it can be NULL. Passing a bitmap makes Allegro use that image in place of its own default substitution (should the operating system's native cursor be unavailable). The bitmap must remain available for the duration in which it could be used. Passing NULL lets Allegro revert to its default substitutions.

The effect of this function will not be apparent until show\_mouse() is called.

## SEE ALSO

[**install\_mouse**(3alleg)](/install_mouse/3alleg.md), [**show\_mouse**(3alleg)](/show_mouse/3alleg.md), [**set\_mouse\_sprite**(3alleg)](/set_mouse_sprite/3alleg.md), [**gfx\_capabilities**(3alleg)](/gfx_capabilities/3alleg.md), [**enable\_hardware\_cursor**(3alleg)](/enable_hardware_cursor/3alleg.md), [**show\_os\_cursor**(3alleg)](/show_os_cursor/3alleg.md)
