?
Solved

Detecting when new item is selected in list box.

Posted on 1998-09-07
2
Medium Priority
?
159 Views
Last Modified: 2013-11-20
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.

Example:
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?

Thanks.
0
Comment
Question by:ameteur
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
prasanth earned 200 total points
ID: 1321810
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.
0
 

Author Comment

by:ameteur
ID: 1321811
Thanks, it turned out I was doing something else wrong.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question