Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


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)

© 2015 Microsoft