This documentation is archived and is not being maintained.


Gets the text limit for this CRichEditCtrl object.

long GetLimitText( ) const;

The current text limit, in bytes, for this CRichEditCtrl object.

The text limit is the maximum amount of text, in bytes, the rich edit control can accept.

For more information, see EM_GETLIMITTEXT in the Platform SDK.

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;
// The new text of the rich edit control.
extern LPCTSTR lpszmyString;
int nLength = strlen(lpszmyString);

// Want the text limit to be at least the size of the new string.
if (pmyRichEditCtrl->GetLimitText() < nLength)