Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What notification message does one have to handle in other to respond to a change of selection or new selection for a listbox and a combobox?


Once a new selection is made I. need to update the state and status of several other controls in a dialogue box, CBN_SELCHANGE and LBN_SELCHANGE would have been suitable but documentaion says the. notification is sent when selection is about to change.The problem is. that the first thing that I must do on receiving the appropriate notufucation(Whether _SELCHANGE or some other) is to get the new selection from the list box or combobox if the listbox or combo box holds the previous selection that is about to change, at that instance, then my purpose is defeated.

So pls can you recommend an appropriate notification or message?
Posted
Comments
[no name] 30-Mar-14 8:26am    
To get the index of the current selection, send the CB_GETCURSEL message to the control.

The CBN_SELCHANGE notification code is not sent when the current selection is set using the CB_SETCURSEL message.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775821%28v=vs.85%29.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900