Programming Tips - Why am I not getting a LBN_SELCHANGE from my listbox?

Date: 2009jan5 Platform: win32 Language: C/C++ Q. Why am I not getting a LBN_SELCHANGE from my listbox? A. Does the listbox have LBS_NOTIFY style? Are you looking for it in the right place? It's in a WM_COMMAND to the parent. Example code that works:
static BOOL INT_PTR CALLBACK MyDlgProc(const HWND hDlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_COMMAND: switch(LOWORD(wParam)) { case IDC_WEEKS: if (HIWORD(wParam) == LBN_SELCHANGE) { // Do something } break; } } }