Titus Information Systems, Inc.

Standard Library
CProgress Class

This class inherits from CDialog and is designed to be used without without being inherited.  An instance of this class will display a modeless Message Box with the current process listed.  This gives the user an indication of a task's progress.  The message box has three parts that can be set: the window title, the message heading, and the message body.  Normally, the window title and message heading are set upon creation and the message body is changed as various processes are completed.  However, with this class, it is possible to have three "levels" of messages that are used to inform the user of the progress of a certain task.  To use this class, access the appropriate member functions and variables as follows:

CProgress(CString Title, CString Heading, CWnd* pParent = NULL)
CProgress(CString Title, CWnd* pParent = NULL)
CProgress(CWnd* pParent = NULL)
These are the constructors.  They initialize the data members and create the message dialog box from a template in VASOLBP.DLL with an ID of 406.  The third version sets the window title to "Processing Progress"; the first and second versions set it to Title.  The second and third versions set the message heading to "Attempting to complete the process.  Please Wait..."; the first version sets it to Heading.
void CProgress::DisconnectWindow()
This public member function destroys the dialog box and releases all allocated resources.
void CProgress::SetTitle(CString Title, CString Heading)
This public member function sets the window title and the message box heading to the specified strings..
void CProgress::SetTitle(CString Title)
This public member function sets the window title to the specified string.
void CProgress::SetHeading(CString Heading)
This public member function sets the message box heading to the specified string.
void CProgress::MessageBox(CString Message, BOOL Cancel = FALSE)
This public member function sets the message body to the specified string.  Based on the setting of Cancel, the CANCEL button on the message box is enabled (TRUE) or disabled (FALSE).  Note that the CProgress::Up data member is set to Cancel.
void CProgress::MessageBox(CString Message, CString Two, BOOL Cancel = FALSE)
This public member function performs a CProgress::MessageBox(Message + Two, Cancel).
virtual void CProgress::DoDataExchange(CDataExchange* pDX)
This public member function may be inherited.  If so, be sure to call the base class function as it performs Dynamic Data Exchange with the dialog box.
virtual void CProgress::OnCancel()
This public member function disables the CANCEL button on the message box and sets the CProgress::Up data member to FALSE.  Note that, if the CANCEL button has been activated, the CProgress::Up data member should be examined by the instantiating class often during the task to determine if processes should continue.
virtual BOOL CProgress::DestroyWindow()
This public member function performs a CProgress::OnCancel() so that closing the message box will only issue a "cancel" rather than turning off the task progress notification.
void CProgress::Creation()
This member function may be inherited, but it should not be, as its purpose is to perform the common functions required in the creation of the class and dialog box.
BOOL CProgress::Up
This public data member indicates the status of the dialog box CANCEL button.  If the instantiating class has activated the cancel button for a task, this data member should be examined often to determine if the user would like the task cancelled.
CString CProgress::Heading
This data member may be inherited.  It is used by CProgress::DoDataExchange() to show the specified message heading in the message box.
CString CProgress::Process
This data member may be inherited.  It is used by CProgress::DoDataExchange() to show the specified message body in the message box.
CString CProgress::Title
This data member may be inherited.  It is used to store the window title.


[ CBinaryFile | TCommandLineInfo | CCommaFile | TDateCtrl | CDDE | CDdeClient | CDdeServer ]
[ CDirectoryLocator | CDirectoryDialog | CDirectoryFind | CDirectoryNew | CFileCopy | TFrameWnd ]
[ InterfaceExcel | CMaintFn | CPrintFile | CProcDialog | TPrintDialog | CProcPropertyPage ]
[ CRegistry | CSDisCreate | CSDisFile | CSDisPage | CSDisView | CTableFile ]
[ CTaskIcon | TPresent | TTime | TDate | TDateTime | CTransferData | TWinApp | CXlTable ]

[ Stand-alone Programs | Standard Library | Conversion Functions | Utility Functions | COBOL Functions ]
[ Windows NT Library | COBOL Library | COBOL Interface | Command Prompt Abbreviations | Purchase Instructions ]

[ Home | Areas of Expertise | "We Do Windows" | Clients and Projects | Software Samples | Package Software Available ]
[ Contact Information | Business Software Philosophy | Church Software Philosophy ]
All contents of this web site are Copyright © Titus Information Systems, Inc., Phoenix, Arizona, U.S.A.