The EM_EXLIMITTEXT message sets an upper limit to the amount of text the user can type or paste into a rich edit control.
EM_EXLIMITTEXT wParam = 0; lParam = (LPARAM) (DWORD) cchTextMax;
No return value.
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.