CComboBox::LimitText

This method 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.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

BOOL LimitText( int nMaxChars );