Share via


CEdit::GetLimitText

Llame a esta función miembro para obtener el límite de texto para este objeto de CEdit .

UINT GetLimitText( ) const;

Valor devuelto

El límite actual de texto, en bytes, para este objeto de CEdit .

Comentarios

El límite de texto es la cantidad máxima de texto, en bytes, que el control de edición puede aceptar.

[!NOTA]

Esta función miembro está disponible a partir de Windows 95 y Windows NT 4.0.

Para obtener más información, vea EM_GETLIMITTEXT en Windows SDK.

Ejemplo

CString strText(_T("I'm an edit control!"));
UINT nLength = strText.GetLength() * sizeof(TCHAR);

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

m_myEdit.SetWindowText(strText);

Requisitos

encabezado: afxwin.h

Vea también

Referencia

Clase de CEdit

Gráfico de jerarquía

CEdit::SetLimitText

CEdit::LimitText