IOleUndoManager::GetLastUndoDescription

Returns the description for the top-level undo unit that is on top of the undo stack.

HRESULT GetLastUndoDescription(

BSTR* pBstr

//Pointer to string

);

Parameters

pBstr
[out] Pointer to a string that contains a description of the top-level undo unit on the undo stack.

Return Values

S_OK
The string was successfully returned and it contains a valid description.
E_FAIL
The undo stack is empty.
E_UNEXPECTED
The undo manager is disabled.

Remarks

This method provides a convenient shortcut for the host application to add a description to its Edit Undo menu item. The *pbstr parameter is a string allocated with the standard string allocator. The caller is responsible for freeing this string.

See Also

IOleUndoManager::GetLastRedoDescription