CBN_SELCHANGE

The CBN_SELCHANGE notification message is sent when the user changes the current selection in the list box of a combo box. The user can change the selection by clicking in the list box or by using the arrow keys. The parent window of the combo box receives this notification in the form of a WM_COMMAND message with CBN_SELCHANGE in the high-order word of the wParam parameter.

CBN_SELCHANGE 
idComboBox = (int) LOWORD(wParam);  // identifier of combo box 
hwndComboBox = (HWND) lParam;       // handle to combo box 
 

Remarks

To get the index of the current selection, send the CB_GETCURSEL message to the control.

The CBN_SELCHANGE notification message is not sent when the current selection is set using the CB_SETCURSEL message.

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

Combo Boxes Overview, Combo Box Messages, CBN_CLOSEUP, CBN_DBLCLK, WM_COMMAND