Task Dialog
This section contains information about the programming elements used with Task Dialog. A task dialog is similar to, while much more flexible than, a basic message box.
Note  Applications written in managed code can access task dialogs by using a source code library provided by Microsoft. For more information, including downloading instructions, see the Windows API Code Pack for Microsoft .NET Framework on the MSDN Code Gallery.

Overviews

About Task Dialogs

A task dialog consists of several elements, most of which are optional.

Functions

TaskDialog

The TaskDialog function creates, displays, and operates a task dialog. The task dialog contains application-defined message text and title, icons, and any combination of predefined push buttons. This function does not support the registration of a callback function to receive notifications.

TaskDialogCallbackProc

The TaskDialogCallbackProc function is an application-defined function used with the TaskDialogIndirect function. It receives messages from the task dialog when various events occur.

The PFTASKDIALOGCALLBACK type defines a pointer to this callback function. TaskDialogCallbackProc is a placeholder for the application defined function name.

TaskDialogIndirect

The TaskDialogIndirect function creates, displays, and operates a task dialog. The task dialog contains application-defined icons, messages, title, verification check box, command links, push buttons, and radio buttons. This function can register a callback function to receive notification messages.

Messages

TDM_CLICK_BUTTON

Simulates the action of a button click in the Task Dialog.

TDM_CLICK_RADIO_BUTTON

Simulates the action of a radio button click in the TaskDialog.

TDM_CLICK_VERIFICATION

Simulates a click on the verification checkbox of the Task Dialog, if it exists.

TDM_ENABLE_BUTTON

Enables or disables a push button in the TaskDialog.

TDM_ENABLE_RADIO_BUTTON

Enables or disables a radio button in the TaskDialog.

TDM_NAVIGATE_PAGE

Refreshes the contents of the Task Dialog. Clients may send this message to the task dialog to dynamically change the task dialog contents at run time.

TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE

Used by clients to designate whether a given Task Dialog button or command link should have a User Account Control (UAC) shield icon (in other words, whether the action invoked by the button requires elevation).

TDM_SET_ELEMENT_TEXT

Used by clients to update a text element on the Task Dialog.

TDM_SET_MARQUEE_PROGRESS_BAR

Indicates whether the hosted progress bar should be displayed in marquee mode.

TDM_SET_PROGRESS_BAR_MARQUEE

Starts and stops the marquee display of the progress bar, and sets the speed of the marquee.

TDM_SET_PROGRESS_BAR_POS

The TDM_SET_PROGRESS_BAR_POS message is used set the current position for a progress bar.

TDM_SET_PROGRESS_BAR_RANGE

The TDM_SET_PROGRESS_BAR_RANGE message is used set the minimum and maximum values for the hosted progress bar.

TDM_SET_PROGRESS_BAR_STATE

The TDM_SET_PROGRESS_BAR_STATE message is used to set the current state of the progress bar.

TDM_UPDATE_ELEMENT_TEXT

The TDM_UPDATE_ELEMENT_TEXT message is available for use by clients to update a text element on the Task Dialog.

TDM_UPDATE_ICON

Refreshes the icon of a task dialog. A window receives this message through its WindowProc function.

Notifications

TDN_BUTTON_CLICKED

Sent by the Task Dialog when the user selects a button or command link in the task dialog. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_CREATED

Sent by the Task Dialog once the dialog has been created and before it is displayed. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_DESTROYED

Sent by the Task Dialog when it is destroyed and its window handle is no longer valid. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_DIALOG_CONSTRUCTED

Sent by the Task Dialog once the dialog has been created and before it is displayed. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_EXPANDO_BUTTON_CLICKED

Sent by the task dialog when the user clicks on the dialog's expando button. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_HELP

Sent by the Task Dialog when the user presses F1 on the keyboard while the dialog has focus. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_HYPERLINK_CLICKED

Sent by the Task Dialog when the user clicks a hyperlink in the Task Dialog content. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_NAVIGATED

Sent by the Task Dialog when a navigation has occurred. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_RADIO_BUTTON_CLICKED

Sent by the Task Dialog when the user selects a button or command link in the task dialog. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_TIMER

Sent by the Task Dialog approximately every 200 milliseconds. This notification is sent when the TDF_CALLBACK_TIMER flag has been set in the dwFlags member of the pConfig parameter to the TaskDialogIndirect function. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

TDN_VERIFICATION_CLICKED

Sent by the task dialog when the user clicks the Task Dialog verification check box. This notification is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

Structures

TASKDIALOG_BUTTON

The TASKDIALOG_BUTTON structure contains information used to display a button in a task dialog. The TASKDIALOGCONFIG structure uses this structure.

TASKDIALOGCONFIG

The TASKDIALOGCONFIG structure contains information used to display a task dialog. The TaskDialogIndirect function uses this structure.

Tags :


Page view tracker