CEdit::GetLimitText
UINT GetLimitText( ) const;
Return Value
The current text limit, in bytes, for this CEdit object.
Remarks
Call this member function to get the text limit for this CEdit object. The text limit is the maximum amount of text, in bytes, that the edit control can accept.
Note This member function is available beginning with Windows 95 and Windows NT 4.0.
For more information, see in the Win32 documentation.
Example
// The pointer to my edit control.
extern CEdit* pmyEdit;
// The new text of the edit control.
extern LPCTSTR lpszmyString;
int nLength = strlen(lpszmyString);
// Want the text limit to be at least the size of the new string.
if (pmyEdit->GetLimitText() < nLength)
pmyEdit->SetLimitText(nLength);
pmyEdit->SetWindowText(lpszmyString);
CEdit Overview | Class Members | Hierarchy Chart
See Also CEdit::SetLimitText, CEdit::LimitText