The EM_EXLIMITTEXT message sets an upper limit to the amount of text in a rich edit control.
EM_EXLIMITTEXT
wParam = 0;
lParam = (LPARAM) (DWORD) cchTextMax;
Parameters
cchTextMax
Maximum amount of text or zero for the default maximum. An OLE object counts as a single character. The default maximum is 32K.
Return Values
No return value.