An application sends a LB_FINDSTRING message to find the first string in a list box which contains the specified prefix.
The LB_FINDSTRING message may be used as either a wide-character message (where text arguments must use Unicode) or an ANSI message (where text arguments must use characters from the Windows 3.x character set installed).
wParam
Contains the zero-based 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 null-terminated string that contains the prefix to search for. The search is case-independent, so this string may contain any combination of uppercase and lowercase letters.
The return value is the index of the matching item or LB_ERR if the search was unsuccessful.
If the list box was created with an owner-draw style but without the LBS_HASSTRINGS style, this message returns the index of the item whose long value (supplied as the lParam parameter of the LB_ADDSTRING or LB_INSERTSTRING message) matches the value supplied as the lParam parameter.
LB_ADDSTRING, LB_INSERTSTRING