---
name: "find_dialog_focus"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/find_dialog_focus/3alleg4"
---

# find\_dialog\_focus(3alleg4)

Searches the dialog for the object which has the input focus. Allegro game programming library.

## NAME

find\_dialog\_focus - Searches the dialog for the object which has the input focus. Allegro game programming library.

## SYNOPSIS

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

**int find\_dialog\_focus(DIALOG \*dialog);**

## DESCRIPTION

Searches the dialog for the object which has the input focus, returning  an index or -1 if the focus is not set. This is useful if you are calling  do\_dialog() several times in a row and want to leave the focus in the  same place it was when the dialog was last displayed, as you can call  do\_dialog(dlg, find\_dialog\_focus(dlg));

## SEE ALSO

**do\_dialog**(3alleg4), **init\_dialog**(3alleg4), **offer\_focus**(3alleg4)
