long GetLimitText( ) const;
Return Value
The current text limit, in bytes, for this CRichEditCtrl object.
Remarks
Call this member function to get the text limit 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 Win32 documentation.
Example
// 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)
pmyRichEditCtrl->LimitText(nLength);
pmyRichEditCtrl->SetWindowText(lpszmyString);
CRichEditCtrl Overview | Class Members | Hierarchy Chart
See Also CRichEditCtrl::LimitText