Manually adds an undo node to the automation object.
#include "ltaut.h"
L_LTAUT_API L_INT L_AutAddUndoNode(pAutomation, dwFlags);
Pointer to an automation handle.
Reserved for future use. Use 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function adds an undo node to the automation object. When used with L_AutSetUndoEnabled, a lengthy operation, consisting of multiple steps, can be combined into one undo call to L_AutUndo. To accomplish this, use the following steps:
Perform the operations to be combined into one undo, For example:
Re-enable the undo feature by calling L_AutSetUndoEnabled(pAutomation, TRUE).
Now, all three operations can be undone with one call to L_AutUndo instead of three calls to L_AutUndo.
L_INT AutAddUndoNodeExample(pAUTOMATIONHANDLE pAutomation)
{
L_INT nRet;
/* Add an undo node manually */
nRet = L_AutAddUndoNode( pAutomation, 0L );
if(nRet != SUCCESS)
return nRet;
/* Disable the undo feature */
nRet = L_AutSetUndoEnabled ( pAutomation, FALSE );
if(nRet != SUCCESS)
return nRet;
/* Do multiple operations on the automation object */
/* Re-enable the undo feature */
nRet = L_AutSetUndoEnabled ( pAutomation, TRUE );
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}