An application sends the LBN_SETFOCUS notification message when a list box receives the keyboard focus. The parent window of the list box receives this notification message through the WM_COMMAND message.
LBN_SETFOCUS
idListBox = (int) LOWORD(wParam); // identifier of list box
hwndListBox = (HWND) lParam; // handle of list box
See Also