IOleUndoManager::Enable

Enables or disables the undo manager.

HRESULT Enable(
  BOOL fEnable   //Indicates whether to enable or disable the undo 
                 // manager
);
 

Parameters

fEnable
[in] Indicates whether to enable or disable the undo manager. If TRUE, the undo manager should be enabled. If FALSE, the undo manager should be disabled.

Return Values

S_OK
The undo manager was successfully enabled or disabled.
E_UNEXPECTED
There is an open undo unit on the stack or the undo manager is currently performing an undo or a redo.

Remarks

The undo manager should clear both stacks when making the transition from enabled to disabled.

If the undo manager is disabled, each method in IOleUndoManager must behave as specified. See each method for details.

QuickInfo

  Windows NT: Use version 4.0 or later. New for OC96.
  Windows: Use Windows 95 or later. New for OC96.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.

See Also

IOleUndoManager