An application sends the EM_SETLIMITTEXT message to set the text limit for an edit control. The text limit is the maximum amount of text, in bytes, that the edit control can contain.
EM_SETLIMITTEXT wParam = (WPARAM) cbMax; // new text limits, in bytes lParam = 0; // not used, must be zero
This message does not return a value.
The EM_SETLIMITTEXT message replaces the EM_LIMITTEXT message.