LB_GETCURSEL

This message returns the index of the currently selected item, if any.

Parameter Description  

wParam Is not used.  
lParam Is not used.  

Return Value

The return value is the index of the currently selected item. It is LB_ERR if no item is selected or if the list-box type is multiple selection.