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


Retrieves the length of the text, in characters, in this CRichEditCtrl object, not including the terminating null character.

long GetTextLength( ) const;

The length of the text in this CRichEditCtrl object.

For more information, see WM_GETTEXTLENGTH in the Platform SDK.

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;

// Limit the rich edit controls text to the number of 
// characters currently in it.
© 2015 Microsoft