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

# find\_dialog\_focus(3alleg)

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**(3alleg)](/do_dialog/3alleg.md), [**init\_dialog**(3alleg)](/init_dialog/3alleg.md), [**offer\_focus**(3alleg)](/offer_focus/3alleg.md)
