An application sends a LB_GETCURSEL message to retrieve the index of the currently selected item, if any, in a list box.
wParam
This parameter is not used.
lParam
This parameter is not used.
The return value is the index of the currently selected item. It is LB_ERR if no item is currently selected.