Click here to Skip to main content
15,867,488 members
Articles / Desktop Programming / MFC
Article

CTaskProgressDialog: A dialog indicating operation progress for multiple tasks

Rate me:
Please Sign up or sign in to vote.
4.60/5 (4 votes)
17 Mar 20022 min read 101.7K   3.1K   61   8
Progress indicator for multi-tasks in a project

Please visit my homepage and the Forum for questions, suggestions, and bug reports.

Sample Image - TaskProgDlg.gif
Sample Image - TaskProgDlgHot.gif

Introduction

Many of you have seen a kind of dialog showing multiple task installations for applications like Netscape and Explorer. A multi-task dialog can be summarized as a task area and a progress bar embedded in the dialog. The task area is a list of text strings showing multiple tasks to be performed. The progress bar indicates the percentage of task completed. It is quite common that image icons are associated with each text string to indicate the processing state of the task (See figure above). It is also common that many applications involve a series of lengthy operations which can be visually represented by the task dialog, e.g., Adobe Illustrator (AI) reads different files (binary AI native file and embedded image files) when opening .AI documents.

CTaskProgressDialog is implemented to visually represent those lengthy operations. It is modified from a progress bar dialog generated by Visual Studio. It behaves like a modaless dialog. If a user clicks on the Cancel button on the dialog during processing, the dialog will be dismissed without completion of the process.

How to use

Use of CTaskProgressDialog is fairly easy. Just following those steps below:

  • Declare a CTaskProgressDialog member variable in an appropriate class of your project;
  • Insert the dialog resource and source files (TaskProgressDlg.h, TaskProgressDlg.cpp) into your project;
  • Instantiate, initialize, and show the dialog;
  • Dimiss the dialog and do not forget to free the dialog memory;

If you are not sure on how to use the dialog, take a look at the demo project.

Please visit my homepage and the Forum for questions, suggestions, and bug reports.

Version History

  • v1.1 03-12-02
    • Change list view of list ctrl to report view
    • Selection (first picture) and Hot mode (second picture) are supported for indicating the current task being processed.
  • V1.0 03-12-02 First version

Any comments, questions, or bug report?

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Engineer
United States United States
Yellowine is a fan of MFC. He has been programming for several years.

Comments and Discussions

 
QuestionHow to add and call my own tasks? Pin
chritsche19-Mar-10 14:31
chritsche19-Mar-10 14:31 
General[Message Deleted] Pin
Danny Rodriguez27-Jan-08 9:16
Danny Rodriguez27-Jan-08 9:16 
GeneralDTS Pin
Rashid Thadha15-Mar-02 0:44
Rashid Thadha15-Mar-02 0:44 
GeneralRe: DTS Pin
Mario M.15-Mar-02 3:00
Mario M.15-Mar-02 3:00 
GeneralRe: DTS Pin
yellowine15-Mar-02 5:06
yellowine15-Mar-02 5:06 
GeneralRe: DTS Pin
Mario M.15-Mar-02 6:29
Mario M.15-Mar-02 6:29 
GeneralRe: DTS Pin
yellowine15-Mar-02 11:05
yellowine15-Mar-02 11:05 
GeneralRe: DTS Pin
19-Mar-02 13:03
suss19-Mar-02 13:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.