[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'TaskDlgEmulation' (#lcl)

# ExecuteLCLTaskDialog

Executes an emulated task dialog for using the specified arguments.

## Declaration

Source position: taskdlgemulation.pp line 179

`function ExecuteLCLTaskDialog(`
`const ADlg: TCustomTaskDialog;`
`AParentWnd: HWND;`
`out ARadioRes: Integer`
`):Integer;`

## Arguments

`ADlg` |  | TTaskDialog instance with the settings for the task dialog.
`AParentWnd` |  | Handle for the form which is the parent for the task dialog form.
`ARadioRes` |  | Returns the identifier for the selected radio button on the task dialog form.

## Function result

Modal result value captured when the emulated task dialog form is executed.

## Description

ExecuteLCLTaskDialog is an Integer function used to execute an emulated task dialog form for the specified TCustomTaskDialog instance. It is a convenience routine called from the Execute method in the widgetset class instance for those platforms which do not support the native Task Dialog API.

ExecuteLCLTaskDialog creates a temporary instance of TLCLTaskDialog and calls its Execute method using the arguments to the routine. The return value contains the result from the Execute method in the dialog form; -1 indicates that ADlg did not contain a valid TCustomTaskDialog instance. Otherwise, it contains the modal result from the dialog form.

## See also

TLCLTaskDialog.Execute |  | Configures and displays the emulated task dialog and returns the modal result value.
TCustomTaskDialog.Execute |  | Displays the task dialog and captures the modal result value.
TCustomTaskDialog.ModalResult |  | Modal result value returned when the Task dialog was executed.