Partager via


CRichEditCtrl::GetLimitText

Obtient la limite de texte pour cet objet d' CRichEditCtrl .

long GetLimitText( ) const;

Valeur de retour

La limite de texte actuelle, en octets, de cet objet d' CRichEditCtrl .

Notes

La limite de texte est la quantité maximale de texte, en octets, le contrôle RichEdit peut recevoir.

Pour plus d'informations, consultez l' EM_GETLIMITTEXT dans Kit de développement logiciel Windows.

Exemple

// The new text of the rich edit control.
LPCTSTR lpszmyString = _T("Here's some text in our rich edit control!");
long nLength = (long)_tcslen(lpszmyString);

// Want the text limit to be at least the size of the new string.
if (m_myRichEditCtrl.GetLimitText() < nLength)
   m_myRichEditCtrl.LimitText(nLength);

m_myRichEditCtrl.SetWindowText(lpszmyString);   

Configuration requise

Header: afxcmn.h

Voir aussi

Référence

Classe de CRichEditCtrl

Graphique de la hiérarchie

CRichEditCtrl::LimitText