Platform SDK: MAPI |
Many of the operations that you perform for clients can take a long time to complete. To inform clients of the progress of a lengthy operation, you can show an indicator that displays graphically the finished portion of an operation at any given point from the start of the operation to its completion. Typically, the progress indicator looks something like the following illustration, with each tic mark representing a percentage of the total operation to be completed.
The following methods support lengthy operations and the display of a progress indicator:
To display a progress indicator, MAPI defines a progress object. Progress objects implement the IMAPIProgress interface, an interface which includes methods for establishing the range of the indicator and creating the display. MAPI provides a progress object implementation as do some clients. You should use a client's implementation if one is supplied as an input parameter to the method performing the operation. If the client passes NULL instead of a pointer to a progress object, use MAPI's implementation by calling IMAPISupport::DoProgressDialog.