IOleUndoManager::Add  319SHYT

Adds a simple undo unit to the collection.

HRESULT Add(

    IOleUndoUnit* pUU

//Pointer to undo unit to be added

   );

 

 

Parameters

pUU

[in] Pointer to undo unit to be added.

 

Return Values

S_OK

The specified unit was successfully added, the parent unit was blocked, or the undo manager is disabled.

 

Remarks

This method is implemented the same as IOleParentUndoUnit::Add. The parent undo unit or undo manager must accept any undo unit given to it, unless it is blocked. If it is blocked, it should do nothing but return S_OK.

Note to Implementers

If the undo manager is in the base state, it should put the new unit on the undo stack and discard the entire redo stack. If the undo manager is in the undo state, it should put new units on the redo stack. If the undo manager is in the redo state, it should put units on the undo stack without affecting the redo stack.

See Also

IOleParentUndoUnit::Add