CTaskDialog Class
A pop-up dialog box that functions like a message box but can display additional information to the user. The CTaskDialog also includes functionality for gathering information from the user.
class CTaskDialog : public CObject
Members
Constructors
Constructs a CTaskDialog object. |
Methods
Adds a command button control to the CTaskDialog. |
|
Adds a radio button to the CTaskDialog. |
|
Clicks a command button control or common button programmatically. |
|
Clicks a radio button programmatically. |
|
Displays the CTaskDialog. |
|
Retrieves the number of common buttons available. |
|
Converts a standard Windows button to the common button type associated with the CTaskDialog class. |
|
Converts one of the common button types associated with the CTaskDialog class to a standard Windows button. |
|
Returns the option flags for this CTaskDialog. |
|
Returns the selected command button control. |
|
Returns the selected radio button. |
|
Retrieves the state of the verification check box. |
|
Determines whether a command button control or common button is enabled. |
|
Determines whether a radio button is enabled. |
|
Determines whether the computer that is running the application supports the CTaskDialog. |
|
Adds command button controls by using data from the string table. |
|
Adds radio buttons by using data from the string table. |
|
Transfers the focus to another CTaskDialog. |
|
The framework calls this method when the user clicks a command button control. |
|
The framework calls this method after it creates the CTaskDialog. |
|
The framework calls this method immediately before it destroys the CTaskDialog. |
|
The framework calls this method when the user clicks on the expansion button. |
|
The framework calls this method when the user requests help. |
|
The framework calls this method when the user clicks on a hyperlink. |
|
The framework calls this method when the CTaskDialog is initialized. |
|
The framework calls this method when the user moves the focus with regard to controls on the CTaskDialog. |
|
The framework calls this method when the user selects a radio button control. |
|
The framework calls this method when the timer expires. |
|
The framework calls this method when the user clicks the verification check box. |
|
Removes all the command controls from the CTaskDialog. |
|
Removes all the radio buttons from the CTaskDialog. |
|
Updates a command button control on the CTaskDialog. |
|
Updates a subset of common buttons to be enabled and require UAC elevation. |
|
Adds common buttons to the CTaskDialog. |
|
Updates the content of the CTaskDialog. |
|
Specifies the default command button control. |
|
Specifies the default radio button. |
|
Adjusts the width of the CTaskDialog. |
|
Updates the expansion area of the CTaskDialog. |
|
Updates the footer icon for the CTaskDialog. |
|
Updates the text on the footer of the CTaskDialog. |
|
Updates the main icon of the CTaskDialog. |
|
Updates the main instruction of the CTaskDialog. |
|
Configures the options for the CTaskDialog. |
|
Configures a marquee bar for the CTaskDialog and adds it to the dialog box. |
|
Adjusts the position of the progress bar. |
|
Adjusts the range of the progress bar. |
|
Sets the state of the progress bar and displays it on the CTaskDialog. |
|
Enables or disables a radio button. |
|
Sets the checked state of the verification check box. |
|
Sets the text on the right side of the verification check box. |
|
Sets the title of the CTaskDialog. |
|
Creates and displays a CTaskDialog. |
|
The framework calls this in response to various Windows messages. |
Data Members
m_aButtons |
The array of command button controls for the CTaskDialog. |
m_aRadioButtons |
The array of radio button controls for the CTaskDialog. |
m_bVerified |
TRUE indicates the verification check box is checked; FALSE indicates it is not. |
m_footerIcon |
The icon in the footer of the CTaskDialog. |
m_hWnd |
A handle to the window for the CTaskDialog. |
m_mainIcon |
The main icon of the CTaskDialog. |
m_nButtonDisabled |
A mask that indicates which of the common buttons are disabled. |
m_nButtonElevation |
A mask that indicates which of the common buttons require UAC elevation. |
m_nButtonId |
The ID of the selected command button control. |
m_nCommonButton |
A mask that indicates which common buttons are displayed on the CTaskDialog. |
m_nDefaultCommandControl |
The ID of the command button control that is selected when the CTaskDialog is displayed. |
m_nDefaultRadioButton |
The ID of the radio button control that is selected when the CTaskDialog is displayed. |
m_nFlags |
A mask that indicates the options for the CTaskDialog. |
m_nProgressPos |
The current position for the progress bar. This value must be between m_nProgressRangeMin and m_nProgressRangeMax. |
m_nProgressRangeMax |
The maximum value for the progress bar. |
m_nProgressRangeMin |
The minimum value for the progress bar. |
m_nProgressState |
The state of the progress bar. For more information, see CTaskDialog::SetProgressBarState. |
m_nRadioId |
The ID of the selected radio button control. |
m_nWidth |
The width of the CTaskDialog in pixels. |
m_strCollapse |
The string the CTaskDialog displays to the right of the expansion box when the expanded information is hidden. |
m_strContent |
The content string of the CTaskDialog. |
m_strExpand |
The string the CTaskDialog displays to the right of the expansion box when the expanded information is displayed. |
m_strFooter |
The footer of the CTaskDialog. |
m_strInformation |
The expanded information for the CTaskDialog. |
m_strMainInstruction |
The main instruction of the CTaskDialog. |
m_strTitle |
The title of the CTaskDialog. |
m_strVerification |
The string that the CTaskDialog displays to the right of the verification check box. |
Remarks
The CTaskDialog class replaces the standard Windows message box and has additional functionality such as new controls to gather information from the user. This class is in the MFC library in Visual Studio 2010. The CTaskDialog is available starting with Windows Vista. Earlier versions of Windows cannot display the CTaskDialog object. Use CTaskDialog::IsSupported to determine at runtime whether the current user can display the task dialog box. The standard Windows message box is still supported in Visual Studio 2010.
The CTaskDialog is available only when you build your application by using the Unicode library.
The CTaskDialog has two different constructors. One constructor enables you to specify two command buttons and a maximum of six regular button controls. You can add more command buttons after you create the CTaskDialog. The second constructor does not support any command buttons, but you can add an unlimited number of regular button controls. For more information about the constructors, see CTaskDialog::CTaskDialog.
The following image shows a sample CTaskDialog to illustrate the location of some of the controls.
CTaskDialog Sample
Requirements
Minimum required operating system: Windows Vista
Header: afxtaskdialog.h
See Also
Tasks
Walkthrough: Adding a CTaskDialog to an Application