This member function limits the length, in bytes, of the text that the user can enter into the edit control of a combo box.
If the combo box does not have the style CBS_AUTOHSCROLL, setting the text limit to be larger than the size of the edit control will have no effect.
LimitText only limits the text the user can enter. It has no effect on any text already in the edit control when the message is sent, nor does it affect the length of the text copied to the edit control when a string in the list box is selected.
BOOL LimitText( int nMaxChars );
Header File | Afxwin.h |
Platforms | |
Versions | 1.0 and later |
Complete documentation | Visual C++ documentation |
CComboBox Overview, CComboBox Member Functions, Control Classes