LAutomation::SetUndoLevel

#include "ltwrappr.h"

L_INT LAutomation::SetUndoLevel (uLevel);

L_UINT uLevel;

undo level

Sets the automation undo level.

Parameter

Description

uLevel

An integer value that represents the maximum number of undo operations that can be performed in each container associated with the automation handle. The default value is DEF_AUTOMATION_UNDO_LEVEL [16].

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The undo level determines the number of automation operations that can be done within an automation container. If the undo level is set to the default calue of DEF_AUTOMATION_UNDO_LEVEL [16], then each container associated with the automation handle has an undo level of 16.

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

To undo an automation operation, call LAutomation::Undo.

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::GetUndoLevel, LAutomation::Undo, LAutomation::CanUndo

Topics:

Undoing and Redoing Automation Operations

Example

This example shows how to Get/Set the automation undo level.

L_INT LAutomation_SetUndoLevelExample(LAutomation  &lauto) 
{ 
   L_INT nRet; 
   nRet = lauto. IsValid (); 
   if ( SUCCESS == nRet ) /* check the validity of the automation handle */ 
   { 
      L_UINT uAutUndoLevel ; 
      /* get the current automation undo level */ 
      uAutUndoLevel = lauto.GetUndoLevel () ; 
      if ( 32 != uAutUndoLevel ) 
      { 
         /* set the automation undo level to 32 */ 
         nRet = lauto.SetUndoLevel (32 ) ; 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
   } 
   else 
   { 
      return nRet ; 
   } 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Container and Automation C++ Class Library Help