Solved

Detecting when new item is selected in list box.

Posted on 1998-09-07
2
156 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
2 Comments
 
LVL 2

Accepted Solution

by:
prasanth earned 50 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 111
Replacement selected text 2 63
NotAlone Challenge 20 85
Execute multiple curl cmds with sleep and send output to file 10 104
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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