Solved

Detecting Double Click in CListCtrl

Posted on 1997-07-14
3
449 Views
Last Modified: 2013-11-20
How do you process a double click on a CListCtrl ?

I have added the message map using class wizard, but the  
value returned to the function does not produce meaningful values for the iItem part of the structure. The items in the CListCtrl are numbered 1-5, but the numbers returned in CListCtrl are 100,000 + !!

I am almost at trhe stage of detecting the double click, and then scanning all items to see if they are selected, which is a pretty dumb way to do it.

Thanks.

Glenn Corbett
0
Comment
Question by:gcorbett
3 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1302559
Use:
void CYourListCtrl::OnLButtonDblClk(UINT nFlags, CPoint point)
{
 int i = HitTest( point, &nFlags );
 if( i != -1 )
 {
 // do what you want with list item #i (zero-based)
 }
}
0
 

Expert Comment

by:jasiek
ID: 1302560
Hello,
I do it in another way. If this answer is wrong, I will tell you my way.
Regards,
0
 

Author Comment

by:gcorbett
ID: 1302561
Thanks !!

I will give it a go
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 54
Whole sheet autoscrub still needed 19 50
how to use laptop or pad camera in vb.net windows application 2 71
Capture logon name 13 73
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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