Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This message is sent by an application to search a list box for an item that begins with the characters in a specified string. If a matching item is found, the item is selected.
LB_SELECTSTRING wParam= (WPARAM) indexStart ; lParam= (LPARAM)(LPCTSTR) lpszFind ;
Parameters
Return Values
The index of the selected item indicates a successful search. LB_ERR indicates an unsuccessful search; the current selection is not changed.
Remarks
The list box is scrolled, if necessary, to bring the selected item into view.
Do not use this message with a list box that has the LBS_MULTIPLESEL style.
An item is selected only if its initial characters from the starting point match the characters in the string specified by the lpszFindparameter.
If you create the list box with an owner-drawn style but without the LBS_HASSTRINGS style, this message returns the index of the item whose long value (supplied as the lParamparameter of the LB_ADDSTRINGor LB_INSERTSTRINGmessage) matches the value supplied as the lParamparameter of LB_SELECTSTRING.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
LB_ADDSTRING, LB_FINDSTRING, LB_INSERTSTRING