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

# do\_dialog(3alleg)

Basic dialog manager function. Allegro game programming library.

## NAME

do\_dialog - Basic dialog manager function. Allegro game programming library.

## SYNOPSIS

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

**int do\_dialog(DIALOG \*dialog, int focus\_obj);**

## DESCRIPTION

The basic dialog manager function. This displays a dialog (an array of  dialog objects, terminated by one with a NULL dialog procedure), and sets  the input focus to the focus\_obj (-1 if you don't want anything to have  the focus). It interprets user input and dispatches messages as they are  required, until one of the dialog procedures tells it to close the  dialog, at which point it returns the index of the object that caused it  to exit, or until ESC is pressed, at which point it returns -1.

## SEE ALSO

[**popup\_dialog**(3alleg)](/popup_dialog/3alleg.md), [**init\_dialog**(3alleg)](/init_dialog/3alleg.md), [**centre\_dialog**(3alleg)](/centre_dialog/3alleg.md), [**set\_dialog\_color**(3alleg)](/set_dialog_color/3alleg.md), [**find\_dialog\_focus**(3alleg)](/find_dialog_focus/3alleg.md), [**excustom**(3alleg)](/excustom/3alleg.md), [**exgui**(3alleg)](/exgui/3alleg.md), [**exrgbhsv**(3alleg)](/exrgbhsv/3alleg.md)
