Solved

Detecting Double Click in CListCtrl

Posted on 1997-07-14
3
457 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
[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
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
List out all word 7 359
withoutTen challenge 14 140
canBalance challenge 34 111
x-bar in Google Sheets 2 129
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 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