CGXLongOperation::GetRollbackConfirmedState

static BOOL GetRollbackConfirmedState();

Return Value

TRUE if user has confirmed to rollback (undo) the operation; FALSE otherwise.

Remarks

Determines whether the user has pressed Rollback in the abort-dialog box.

You should call GetRollbackConfirmedState after DoMessages did abort, e.g.:

   TRY
   {
      BOOL bAbort = FALSE;
     while (bStatementsToProcess)
     {
         // check, if user pressed ESC to cancel
         if (theOp.NeedMessages())
         {
            theOp.SetPercentDone(nPercentDone);
            theOp.DoMessages(bAbort);
            if (bAbort)
               AfxThrowUserException();
         }
      }
      // operation executed successfully
      // cleanup
   }
   CATCH(CUserException, e)
   {
      if (theOp.GetRollbackConfirmedState())
      {
         // user did select "Retry" in the Abort-dialog box
         // So, try to undo the operation and
         // cleanup
      }
      ...
   }

See Also

 CGXLongOperation::DoMessages  CGXLongOperation::SetCanAbort  CGXLongOperation::GetRollbackConfirmedState

CGXLongOperation

 Class Overview |  Class Members