LAutomation::Undo

#include "ltwrappr.h"

L_INT LAutomation::Undo (dwFlags=0);

L_UINT32 dwFlags;

/* reserved */

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

Parameter

Description

dwFlags

Reserved for future use. Must be 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

LAutomation::Undo must be called at least once in order to perform a "redo" using LAutomation::Redo.

To determine the current undo level call LAutomation::GetUndoLevel.

To change the undo level call LAutomation::SetUndoLevel.

To determine whether an automation operation can be undone, call LAutomation::CanUndo.

For information about grouping multiple operations into a single undo process, refer to LAutomation::AddUndoNode.

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:

LAutomation::CanUndo, LAutomation::GetUndoLevel, LAutomation::SetUndoLevel

Topics:

Undoing and Redoing Automation Operations

Example

This example shows how to undo the last automation operation.

L_INT LAutomation_UndoExample(LAutomation &lauto)
{
   L_INT nRet;
   nRet = lauto.IsValid ();
   if ( nRet == SUCCESS ) /* check the validity of the automation handle */
   {
      L_BOOL fCanUndo ;
      /* Query the ability of undoing */
      fCanUndo = lauto.CanUndo () ;
      if ( fCanUndo )
      {
         /* undo the last automation operation */
         nRet = lauto.Undo () ;
         if(nRet != SUCCESS)
            return nRet;
      }
   }
   else
   {
      return nRet;
   }
      return SUCCESS ;
}