LB_SELITEMRANGE

An application sends an LB_SELITEMRANGE message to select one or more consecutive items in a multiple-selection list box.

LB_SELITEMRANGE 
wParam = (WPARAM) (BOOL) fSelect;   // selection flag 
lParam = MAKELPARAM(wFirst, wLast); // first and last items 
 

Parameters

fSelect
Value of wParam. Specifies how to set the selection. If the fSelect parameter is TRUE, the string is selected and highlighted; if fSelect is zero, the highlight is removed and the string is no longer selected.
wFirst
Value of the low-order word of lParam. Specifies the zero-based index of the first item to select.
wLast
Value of the high-order word of lParam. Specifies the zero-based index of the last item to select.

Return Values

If an error occurs, the return value is LB_ERR.

Remarks

Use this message only with multiple-selection list boxes.

This message can select a range only within the first 65,536 items.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winuser.h.

See Also

List Boxes Overview, List Box Messages, LB_SELITEMRANGEEX, LB_SETSEL