Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detecting Double Click in CListCtrl

Posted on 1997-07-14
3
Medium Priority
?
465 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 400 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

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. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

730 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