The EM_EXLIMITTEXT message sets an upper limit to the amount of text the user can type or paste into a rich edit control.
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_EXLIMITTEXT,
| // message ID
|
(WPARAM) wParam,
| // = (WPARAM) () wParam; |
(LPARAM) lParam
| // = (LPARAM) () lParam; |
);
| |
Parameters
- wParam
-
This parameter is not used; it must be zero.
- lParam
-
Specifies the maximum amount of text that can be entered. If this parameter is zero, the default maximum is used, which is 64K characters. A Component Object Model (COM) object counts as a single character.
Return Value
This message does not return a value.
Remarks
The text limit set by the EM_EXLIMITTEXT message does not limit the amount of text that you can stream into a rich edit control using the EM_STREAMIN message with lParam set to SF_TEXT. However, it does limit the amount of text that you can stream into a rich edit control using the EM_STREAMIN message with lParam set to SF_RTF.
Before EM_EXLIMITTEXT is called, the default limit to the amount of text a user can enter is 32,767 characters.
Message Information
Header | Declared in Richedit.h |
---|
Minimum operating systems |
Windows 95, Windows NT 4.0 |
---|
See Also
Rich Edit Controls, EM_STREAMIN