An application sends the LBN_SELCHANGE notification message when the selection in a list box is about to change. The parent window of the list box receives this notification message through the WM_COMMAND message.
LBN_SELCHANGE
idListBox = (int) LOWORD(wParam); // identifier of list box
hwndListBox = (HWND) lParam; // handle of list box