Task Dialog

This section contains information about the programming elements used with a task dialog. A task dialog is similar to, while much more flexible than, a basic message box.

Overviews

Topic Contents
About Task Dialogs Describes the elements of a task dialog.

Functions

Topic Contents
TaskDialog 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 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 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

Topic Contents
TDM_CLICK_BUTTON Simulates the action of a button click in a task dialog.
TDM_CLICK_RADIO_BUTTON Simulates the action of a radio button click in a task dialog.
TDM_CLICK_VERIFICATION Simulates the action of a verification checkbox click in a task dialog.
TDM_ENABLE_BUTTON Enables or disables a push button in a task dialog.
TDM_ENABLE_RADIO_BUTTON Enables or disables a radio button in a task dialog.
TDM_NAVIGATE_PAGE Recreates a task dialog with new contents, simulating the functionality of a multi-page wizard.
TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE Specifies whether a given task dialog button or command link should have a User Account Control (UAC) shield icon; that is, whether the action invoked by the button requires elevation.
TDM_SET_ELEMENT_TEXT Updates a text element in a 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 Sets the current position for a progress bar.
TDM_SET_PROGRESS_BAR_RANGE Sets the minimum and maximum values for the hosted progress bar.
TDM_SET_PROGRESS_BAR_STATE Sets the current state of the progress bar.
TDM_UPDATE_ELEMENT_TEXT Updates a text element in a task dialog.
TDM_UPDATE_ICON Refreshes the icon of a task dialog.

Notifications

Topic Contents
TDN_BUTTON_CLICKED Sent by a task dialog when the user selects a button or command link in the task dialog. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_CREATED Sent by a task dialog after the task dialog has been created and before it is displayed. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_DESTROYED Sent by a task dialog when it is destroyed and its window handle is no longer valid. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_DIALOG_CONSTRUCTED Sent by a task dialog after the task dialog has been created and before it is displayed. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_EXPANDO_BUTTON_CLICKED Sent by a task dialog when the user clicks on the task dialog's expando button. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_HELP Sent by a task dialog when the user presses F1 on the keyboard while the task dialog has focus. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_HYPERLINK_CLICKED Sent by a task dialog when the user clicks a hyperlink in the task dialog content. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_NAVIGATED Sent by a task dialog when a navigation has occurred. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_RADIO_BUTTON_CLICKED Sent by a task dialog when the user selects a button or command link in the task dialog. This notification code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.
TDN_TIMER Sent by a task dialog approximately every 200 milliseconds. This notification code is sent when the TDF_CALLBACK_TIMER flag has been set in the dwFlags member of the TASKDIALOGCONFIG structure that was passed to the TaskDialogIndirect function. This notification code 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 code is received only through the task dialog callback function, which can be registered using the TaskDialogIndirect method.

Structures

Topic Contents
TASKDIALOG_BUTTON Contains information used to display a button in a task dialog. The TASKDIALOGCONFIG structure uses this structure.
TASKDIALOGCONFIG Contains information used to display a task dialog. The TaskDialogIndirect function uses this structure.