Available in LEADTOOLS Document and Medical Imaging toolkits.
AnnUndoEnable example for C++ 4.0 and later
// This example toggles the Undo feature
m_Lead1.SetAnnUndoEnable(!m_Lead1.GetAnnUndoEnable());