L_AutUndo

#include "ltaut.h"

L_LTAUT_API L_INT L_AutUndo(pAutomation, dwFlags)

pAUTOMATIONHANDLE pAutomation;

/* pointer to an automation handle */

L_UINT32 dwFlags;

/* reserved */

Undoes the last automation operation performed in the active automation container.

Parameter

Description

pAutomation

Pointer to an automation handle.

dwFlags

Reserved for future use. Must be 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

L_AutUndo must be called at least once in order to perform a "redo" using L_AutRedo.

To determine the current undo level call L_AutGetUndoLevel.

To change the undo level call L_AutSetUndoLevel.

To determine whether an automation operation can be undone, call L_AutCanUndo.

For information about grouping multiple operations into a single undo process, refer to L_AutAddUndoNode.

Required DLLs and Libraries

LTAUT

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_AutCanUndo, L_AutGetUndoLevel, L_AutSetUndoLevel

Topics:

Undoing and Redoing Automation Operations

Example

This example shows how to undo the last automation operation.

  L_INT AutUndoExample(pAUTOMATIONHANDLE pAutomation)
{
   L_INT nRet;
   nRet = L_AutIsValid ( pAutomation );
   if(nRet != SUCCESS)
      return nRet;
   if ( nRet == SUCCESS  ) /* check the validity of the automation handle */
   {
      L_BOOL fCanUndo ;
      
      /* Query the ability of undoing */
      nRet = L_AutCanUndo ( pAutomation, &fCanUndo ) ;
      if(nRet != SUCCESS)
         return nRet;
      if ( fCanUndo )
      {
         /* undo the last automation operation */
         nRet = L_AutUndo ( pAutomation, 0 ) ;
         if(nRet != SUCCESS)
            return nRet;
      }
   }
   else
   {
      return nRet ;
   }
   return SUCCESS ;
}