Detecting when new item is selected in list box.

Hi eevryone,

How do you detect when a new item within a list box is selected (with the left-mouse-button)?  I know about LBN_SELCHANGE, but that is called before the new selection takes effect.  I want to know what the NEW selection is.

I select list item B in a list box.  I want to know what message (if any) is sent to tell me that list item B has been selected.  If no messages are sent that tell me this, then how do I accomplish this basic task?

Who is Participating?
prasanthConnect With a Mentor Commented:
LBN_SELCHANGE is the currect message to be processing. When you process it, Use CListBox::GetCurSel or send LB_GETCURSEL to get the current selection.
ameteurAuthor Commented:
Thanks, it turned out I was doing something else wrong.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.