Export (0) Print
Expand All

About Task Dialogs

A task dialog is a dialog box that can be used to display information and receive simple input from the user. Like a message box, it is formatted by the operating system according to parameters you set. However, a task dialog has many more features than a message box.

Note   Task dialogs require the single-threaded apartment (STA) model.

Parts of a Task Dialog

A task dialog consists of several elements, most of which are optional. The following illustration shows the various parts of a task dialog.

Screen shot of a window showing various buttons, including one next to collapsed control text

In the following illustration, the user has clicked the button beside the collapsed control text, causing alternative text to be displayed there and in the footer.

Screen shot of the previous window, but with two lines of expanded control text

The illustrations show the following parts:

PartDescriptionTASKDIALOGCONFIG member
Window titleCaption of the window.pszWindowTitle
Main iconA large icon that signifies the purpose of the task dialog.hMainIcon or pszMainIcon
Main instructionPrincipal text.pszMainInstruction
ContentExtra text.pszContent
Progress barAn animated bar that shows the progress of some task.dwFlags
Radio buttonsApplication-defined options for the user.pRadioButtons
Custom buttonA button that is not one of the common buttons. This can be either a normal button or, as shown in the illustration, a command link with up to two lines of text.pButtons
Expand/collapse button A button that can be used to toggle between the application-defined collapsed control text (such as "See more details") and the expanded control text, which can be on two or more lines. When the control text is expanded, the additional text in pszExpandedInformation is also shown, either after the content text, or (as shown in the second illustration) in the footer. pszCollapsedControlText and pszExpandedControlText
Verification check boxA checkbox, accompanied by application-defined text, for simple choices such as "Do not show this dialog again."pszVerificationText
Footer iconA small icon that signifies the purpose of the footer text.hFooterIcon or pszFooterIcon
Footer textAdditional text. In the illustrations, the text contains a hyperlink.pszFooter
Common buttonA standard button; in the illustrations, the OK button.dwCommonButtons

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft