---
name: "gui_set_screen"
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/gui_set_screen"
---

# gui\_set\_screen(3alleg)

Changes the bitmap surface GUI routines draw to. Allegro game programming library.

## NAME

gui\_set\_screen - Changes the bitmap surface GUI routines draw to. Allegro game programming library.

## SYNOPSIS

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

**void gui\_set\_screen(BITMAP \*bmp);**

## DESCRIPTION

This function can be used to change the bitmap surface the GUI routines draw to. This can be useful if you are using a double buffering or page  flipping system. Passing NULL will cause the default surface (screen) to be used again. Example:

```
   BITMAP *page[2];
   /* Allocate two pages of video memory */
   page[0] = create_video_bitmap(SCREEN_W, SCREEN_H);
   page[1] = create_video_bitmap(SCREEN_W, SCREEN_H);
   /* Page flip */
   show_video_bitmap(page[0]);
   gui_set_screen(page[0]);
```

## SEE ALSO

[**gui\_get\_screen**(3alleg)](/gui_get_screen/3alleg.md)
