---
name: "createDialog"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/createDialog
revid: 338553
updated: 2023-03-19T00:02:56Z
---

# createDialog

*Command · GUI Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.75*

Locality: effect **local**

## Description

Creates a dialog which is defined either in the mission's [description.ext](../topics/Description.ext.md), in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files. If another dialog is already opened, the desired dialog is created as a child dialog of the one already opened.

> [!NOTE]
> By default, displays created with [createDisplay](../commands/createDisplay.md) are rendered on top of dialogs created with [createDialog](../commands/createDialog.md). If *forceOnTop* is set to [true](../commands/true.md), the dialog will be rendered on top of displays.

## Syntax

### Syntax 1

```sqf
createDialog dialogName
```

**Parameters:**

- `dialogName`: [String](../topics/String.md) - class name used in the description.ext, resource.cpp or config.cpp

**Returns:** [Boolean](../topics/Boolean.md) -  [true](../commands/true.md) when the dialog was created successfully

### Syntax 2

*since arma3 2.08*

```sqf
createDialog [dialogName, forceOnTop]
```

**Parameters:**

- `dialogName`: [String](../topics/String.md) - class name used in the description.ext, resource.cpp or config.cpp
- `forceOnTop`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) if [true](../commands/true.md), dialog will be rendered on top of displays

**Returns:** [Display](../topics/Display.md) - created dialog

## Examples

### Example 1

```sqf
private _ok = createDialog "RscDisplayGame";
if (!_ok) then { hint "Dialog could not be opened!" };
```

## See also

[displayCtrl](../commands/displayCtrl.md) · [createDisplay](../commands/createDisplay.md) · [closeDialog](../commands/closeDialog.md) · [dialog](../commands/dialog.md) · [displayNull](../commands/displayNull.md) · [controlNull](../commands/controlNull.md) · [ctrlCreate](../commands/ctrlCreate.md) · [displayParent](../commands/displayParent.md)

## Community notes

**Killzone_Kid** — 2017-07-29

A user dialog created with [createDisplay](../commands/createDisplay.md) over mission display ([findDisplay](../commands/findDisplay.md) 46) will stop [display event handlers](../commands/displayAddEventHandler.md) added to mission display from firing. However if it is created with [createDialog](../commands/createDialog.md) then the event handlers continue to work.

<sub>Source: [BI Community Wiki — createDialog](https://community.bistudio.com/wiki/createDialog) (revision 338553).</sub>
