MSDN Home >  MSDN Library >  User Interface Design and Development >  Windows Controls >  Individual Control Information >  Rich Edit Controls > 

EM_SETUNDOLIMIT Message


An application sends an EM_SETUNDOLIMIT message to a rich edit control to set the maximum number of actions that can stored in the undo queue.

Syntax

To send this message, call the SendMessage function as follows.
lResult = SendMessage(     // returns LRESULT in lResult
   (HWND) hWndControl,     // handle to destination control
   (UINT) EM_SETUNDOLIMIT,     // message ID
   (WPARAM) wParam,     // = (WPARAM) () wParam;
   (LPARAM) lParam     // = (LPARAM) () lParam;
);

Parameters

wParam
Specifies the maximum number of actions that can be stored in the undo queue.
lParam
This parameter is not used; it must be zero.

Return Value

The return value is the new maximum number of undo actions for the rich edit control. This value may be less than wParam 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.

Message Information

HeaderDeclared in Richedit.h
Minimum operating systems Windows 95 with Rich Edit 2.0 , Windows 98, Windows NT 4.0

See Also

Rich Edit Controls, EM_CANREDO, EM_GETREDONAME, EM_GETUNDONAME, EM_REDO, EM_UNDO
 Contact Us   |  E-Mail this Page   |  MSDN Flash Newsletter
 c 2002 Microsoft Corporation. All rights reserved.   Terms of Use  Privacy Statement   Accessibility