CB_FINDSTRING

Version 3.0

This message finds the first string in the list box of a combo box which matches the given prefix text.

Parameter

Description

 

wParam

Contains the index of the item before the first item to be searched. When the search reaches the bottom of the list box it continues from the top of the list box back to the item specified by wParam. If the wParam parameter is –1, the entire list box is searched from the beginning.

 

lParam

Points to the prefix string. The string must be null-terminated.

 

Return Value

The return value is the index of the matching item or CB_ERR if the search was unsuccessful.

Comments

If the combo box was created with an owner-draw style but without the CBS_HASSTRINGS style, this message returns the index of the item whose long value (supplied as the lParam parameter of the CB_ADDSTRING or CB_INSERTSTRING message) matches the value supplied as the lParam parameter of CB_FINDSTRING.