BOOL SetEditSel( int nStartChar, int nEndChar );
Return Value
Nonzero if the member function is successful; otherwise 0. It is CB_ERR if CComboBox has the CBS_DROPDOWNLIST style or does not have a list box.
Parameters
nStartChar
Specifies the starting position. If the starting position is set to –1, then any existing selection is removed.
nEndChar
Specifies the ending position. If the ending position is set to –1, then all text from the starting position to the last character in the edit control is selected.
Remarks
Selects characters in the edit control of a combo box.
The positions are zero-based. To select the first character of the edit control, you specify a starting position of 0. The ending position is for the character just after the last character to select. For example, to select the first four characters of the edit control, you would use a starting position of 0 and an ending position of 4.
Example
See the example for CComboBox::GetEditSel.
CComboBox Overview | Class Members | Hierarchy Chart
See Also CComboBox::GetEditSel, CB_SETEDITSEL