This documentation is archived and is not being maintained.

CRichEditCtrl::GetTextLength 

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.
pmyRichEditCtrl->LimitText(pmyRichEditCtrl->GetTextLength());
Show: