LAutomation::AddUndoNode

#include "ltwrappr.h"

L_INT LAutomation::AddUndoNode(dwFlags);

Manually adds an undo node to the automation object.

Parameters

L_UINT32 dwFlags

Reserved for future use. Use 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function adds an undo node to the automation object. When used with LAutomation::SetUndoEnabled, a lengthy operation, consisting of multiple steps, can be combined into one undo call to LAutomation::Undo. To accomplish this, use the following steps:

  1. Call LAutomation::AddUndoNode to add an undo node to the automation handle.
  2. Disable the undo feature by calling LAutomation::SetUndoEnabled(FALSE).
  3. Perform the operations to be combined into one undo.
  4. Re-enable the undo feature by calling LAutomation::SetUndoEnabled(TRUE).

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to group several vector operations into a single undo node.

L_INT LAutomation_AddUndoNodeExample(LAutomation  &Automation) 
{ 
   L_INT nRet; 
 
   // Add an undo node manually  
 
   nRet = Automation.AddUndoNode(0); 
   if(nRet != SUCCESS) 
      return nRet; 
 
    
 
   // Disable the undo feature */ 
 
   nRet = Automation.SetUndoEnabled (FALSE); 
   if(nRet != SUCCESS) 
      return nRet; 
 
    
 
   // Do multiple operations on the automation object  
 
    
 
   // Re-enable the undo feature  
 
   nRet = Automation.SetUndoEnabled(TRUE); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help