CGXLongOperation::DoMessages
BOOL DoMessages();
BOOL DoMessages(BOOL& bAbort);
bAbort
A reference to a BOOL. This will be set TRUE if the user has pressed the ESC key to abort the operation.
Return Value
TRUE if windows messages have been processed; FALSE otherwise.
Remarks
Process windows messages. Mouse messages and keyboard events will be eaten.
If the number of ticks since the last call to DoMessages is smaller than the value specified by SetTicksFirstTime / SetTicksContinued,the function will return without processing any message.
If called with the bAbort parameter, the method will check whether user has pressed the ESC key. If the user did press the ESC key, a message box will be shown. The dialog offers several options to the user:
·Abort the operation (by pressing Cancel)
·Rollback the operation (by pressing Retry)
·Continue the operation (by pressing Continue).
If the user confirms that he wants to abort or rollback the operation, bAbort will be set TRUE.
If called without the bAbort parameter, pressing the ESC key has no effect.
Note: You should call DoMessages after checking NeedMessages to avoid unnecessary overhead. NeedMessages is an inline method and thus will be faster.
if (theOp.NeedMessages())
{
...
theOp.DoMessages(bAbort);
}
Control-Factory Specific ->
This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the CGXLongOperation::ImplementLongOperation method from within the control factory class' InitializeApplicationComponents method will make the concrete implementation of this method available to your application.
If no concrete implementation is available this method returns FALSE. No action is performed.
END Control-Factory Specific
See Also
CGXLongOperation::GetAbortConfirmedState CGXLongOperation::GetRollbackConfirmedState CGXLongOperation::SetCanRollback CGXLongOperation::SetCanAbort CGXLongOperation::NeedMessages CGXLongOperation::SetTicksFirstTime CGXLongOperation::SetTicksContinued