   help on notification in a drop down combo box[solved]
  I have made a drop down combo box and populated it with strings. Now I am trying to be able to detect if some one has clicked on a item or not.this is what I have donecase WM_COMMAND:   {switch (wParam){case ComboList:{ if(HIWORD(wParam)== CBN_SELENDOK)  {  MessageBox(hwnd,"boy","Error",0);  }}break;It does not pop uo with the messagebox when a iteam is clicked Any one know why it wont?[Edited by - kingpinzs on December 5, 2005 10:40:20 AM]
  can any one help with this?   ;  CBN_SELCHANGE is what you're looking for. Also, your switch ( wParam ) will not work, you need to doswitch ( LOWORD( wParam ) )   ;  I have i made the changes but it still does nothing.   ;  kingpinz,Where are you handling the WM_COMMAND?  Also, if you have the pointer to the actual combo box I recommend that you determine whether or not anything has been selected by 'HIWORD (wParam) == CBN_SELENDOK' and by comparing the HWND to the combo box and the lParam value.-brad   ;  What is ComboList? The ID or the HWND?With the CBN_ messages the LOWORD of wParam is the ID of the control.   ;  WM_COMMAND is handled byLRESULT CALLBACK TheWindowProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam){ComboList is the ID.How would I do this?"I recommend that you determine whether or not anything has been selected by 'HIWORD (wParam) == CBN_SELENDOK' and by comparing the HWND to the combo box and the lParam value.";  Try like this:case WM_COMMAND:{  switch ( LOWORD( wParam ) )  {    case ComboList: {   if( HIWORD( wParam ) == CBN_SELENDOK )   {    MessageBox(hwnd,"boy","Error",0);   } } break;  }}If this doesn't show the MessageBox on selection of a valid item in the listbox somethings wrong with the parent/child-relationship.   ;  now I get warning unreachable code at beginning of switch statement.Not sure what that means. And it still does not work. So I think it is saying that the switch statment is invalid.scratch that It works I just had to move some code around.Thanks for everyu ones help That is exactley what I need to know.Thanks again to every ones help[Edited by - kingpinzs on December 5, 2005 10:06:05 AM]