EM_SETUNDOLIMIT

[This is preliminary documentation and subject to change.]

Rich Edit 2.0 and later: Send an EM_SETUNDOLIMIT message to a rich edit control to set the maximum number of actions that can stored in the undo queue.

Rich Edit 1.0: This message is not supported.

EM_SETUNDOLIMIT 
wParam = (WPARAM) nMax;    // maximum number of undo actions
lParam = 0 ;               // not used; must be zero 
 

Parameters

nMax
Value of wParam. Specifies the maximum number of actions that can be stored in the undo queue.

Return Values

The return value is the new maximum number of undo actions for the rich edit control. This value may be less than nMax if memory is limited.

Remarks

By default, the maximum number of actions in the undo queue is 100. If you increase this number, there must be enough available memory to accommodate the new number. For better performance, set the limit to the smallest possible value.

Setting the limit to zero disables the Undo feature.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in richedit.h.

See Also

Rich Edit Controls Overview, Rich Edit Messages, EM_CANREDO, EM_GETREDONAME, EM_GETUNDONAME, EM_REDO, EM_UNDO