LB_SETSEL message

Selects an item in a multiple-selection list box and, if necessary, scrolls the item into view.

Parameters

wParam

Specifies how to set the selection. If this parameter is TRUE, the item is selected and highlighted; if it is FALSE, the highlight is removed and the item is no longer selected.

lParam

Specifies the zero-based index of the item to set. If this parameter is –1, the selection is added to or removed from all items, depending on the value of wParam, and no scrolling occurs.

Return value

If an error occurs, the return value is LB_ERR.

Remarks

Use this message only with multiple-selection list boxes.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
LB_GETSEL
LB_SELITEMRANGE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.