CListBox::SetSel

Syntax

int SetSel( int nIndex, BOOL bSelect = TRUE );

Parameters

nIndex

Contains the zero-based index of the string to be set. If -1, the selection is added to or removed from all strings, depending on the value of bSelect.

bSelect

Specifies how to set the selection. If bSelect is TRUE, the string is selected and highlighted; if FALSE, the highlight is removed and the string is no longer selected. The specified string is selected and highlighted by default.

Remarks

Selects a string in a multiple-selection list box.

Use this message only with multiple-selection list boxes.

Return Value

LB_ERR if an error occurs.

See Also

CListBox::GetSel, LB_SETSEL