Microsoft Windows CE 3.0  

CB_SETCURSEL

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 select a string in the list of a combo box. If necessary, the list scrolls the string into view. The text in the edit control of the combo box changes to reflect the new selection and any previous selection in the list is removed.

CB_SETCURSEL
wParam= 
(WPARAM)
index; 
lParam= 0;

Parameters

index
Specifies the zero-based index of the string to select. If the indexparameter is –1, any current selection in the list is removed and the edit control is cleared.

Return Values

The index of the item selected indicates success. CB_ERR indicates that indexis greater than the number of items in the list or if indexis set to –1; the selection is cleared.

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

CB_FINDSTRING, CB_GETCURSEL, CB_SELECTSTRING