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

# Reference for unit 'TaskDlgEmulation'

Implements an emulated task dialog for platforms where the Task Dialog API is not supported.

`uses`
`Classes,`
`SysUtils,`
`LazUTF8,`
`LCLType,` |  | Provides compatibility with the Delphi Windows unit.
`LCLStrConsts,` |  | Contains resource strings used in the LCL.
`LCLIntf,` |  | Contains WinAPI-like functions for Delphi compatibility.
`LMessages,` |  | Contains Lazarus message codes and their mapping to message codes for other platforms/widgetsets.
`InterfaceBase,` |  | Provides a platform-independent widgetset class and helper functions.
`ImgList,` |  | Contains classes and types used in TCustomImageList, the base class for TImageList.
`LCLProc,` |  | Useful lower-level helper functions and classes.
`DateUtils,`
`Math,`
`ComCtrls,` |  | Common controls used in Lazarus forms.
`LResources,` |  | Maintains a global list of Lazarus resources, and provides methods and types used to stream components.
`Menus,` |  | Implements menus used in forms created with the Lazarus IDE.
`Graphics,` |  |
`Forms,` |  | Implements Forms which are the basis for the LCL Graphical User Interface.
`Controls,` |  | Contains types, constants, classes, and routines used to implement visual controls.
`StdCtrls,` |  | Standard controls used in the Lazarus Component Library (LCL).
`ExtCtrls,` |  | Contains extra controls commonly used in Lazarus forms.
`Buttons,` |  | Contains types and classes used to implement specialized buttons.
`Dialogs,` |  | Contains common dialogs used in Lazarus LCL applications.
`DialogRes,` |  | Contains types and constants used to access scalable dialog images.
`LazLoggerBase;`

## Overview

TaskDlgEmulation.pp contains types, routines, and variable used to implement a non-native, emulated Task Dialog. It is used in widgetset classes for platforms where the task dialog API is not available, or not supported for a specific version of an operating system. It emulates the functionality of TaskDialogIndirect available on Windows Vista and later versions. It adds capabilities that TaskDialogIndirect does not have, including:

- Query via combo-box.
- Query via single line edit, which supports masking the input for use with e.g. passwords.

It contains TLCLTaskDialog - a dynamically configured form displayed when a task dialog is executed using its configuration settings. The emulated dialog does not aim to be visually (near) exactly the same as the Vista+ native dialog.

This dialog is invoked by Dialogs.TTaskDialog.Execute on systems that do not support the native Vista+ dialog, and it is also used as a fallback in case the native Vista+ dialog fails (when passed invalid combination of arguments). The dialog therefore uses the Flags property of Dialogs.TTaskDialog, but not all of these flags are supported (yet) in the emulated dialog.

TaskDlgEmulation.pp is part of the Lazarus Component Library (LCL). This unit was originally a part of the freeware Synopse mORMot framework, and licensed under a MPL/GPL/LGPL tri-license; version 1.19. It has been relicensed with permission from Arnaud Bouchez, the original author, and all contributors. The original name was SynTaskDialog.pas.

Remark: | Added in LCL version 4.0 as replacement for the deprecated types in the lcltaskdialog.pas unit.