LButton detection inside a ListCtrl 
Author Message
 LButton detection inside a ListCtrl

I have a DialogBar that contains a Dialog resource that contains a ListCtrl.
I want the program to recognize when the mouse left-clicks in the ListCtrl,
but I can't seem to get it to work.  I have handled the WM_LBUTTONDOWN
message for the DialogBar and am trying to do the same for the ListCtrl.  I
couldn't figure out why it wasn't registering so I wrote a function to
handle the WM_LBUTTONDOWN message for the Dialog resource and then set up
breakpoints in all three OnLButtonDown functions.  When I clicked down in
the ListCtrl, none of the functions recognized it!  Am I doing something
wrong or is there another way to do this?

Thanks for any help

Michael



Fri, 13 Dec 2002 03:00:00 GMT  
 LButton detection inside a ListCtrl
I've come across this just recently, messages are sent via the WM_NOTIFY
message, e.g. TVN_SELCHANGE, NM_CLICK, NM_DBLCLK, etc.

Best regards,
Mark.

=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Get the smart HTML editor and validator,
SmartSite, from http://www.mjsoft.co.uk

mark at mjsoft.co.uk


Quote:
> I have a DialogBar that contains a Dialog resource that contains a
ListCtrl.
> I want the program to recognize when the mouse left-clicks in the
ListCtrl,
> but I can't seem to get it to work.  I have handled the WM_LBUTTONDOWN
> message for the DialogBar and am trying to do the same for the ListCtrl.
I
> couldn't figure out why it wasn't registering so I wrote a function to
> handle the WM_LBUTTONDOWN message for the Dialog resource and then set up
> breakpoints in all three OnLButtonDown functions.  When I clicked down in
> the ListCtrl, none of the functions recognized it!  Am I doing something
> wrong or is there another way to do this?

> Thanks for any help

> Michael



Fri, 13 Dec 2002 03:00:00 GMT  
 LButton detection inside a ListCtrl
Hi Michael,

try this:

in .h
        afx_msg void OnSelchangeListHistory();
        afx_msg void OnDblclickListHistory();

in .cpp

        ON_LBN_SELCHANGE(IDC_LIST_HISTORY, OnSelchangeListHistory)
        ON_LBN_DBLCLK(IDC_LIST_HISTORY, OnDblclickListHistory)

Regards,
Kurt

On Mon, 26 Jun 2000 13:47:26 -0600, "Michael Baker"

Quote:

>I have a DialogBar that contains a Dialog resource that contains a ListCtrl.
>I want the program to recognize when the mouse left-clicks in the ListCtrl,
>but I can't seem to get it to work.  I have handled the WM_LBUTTONDOWN
>message for the DialogBar and am trying to do the same for the ListCtrl.  I
>couldn't figure out why it wasn't registering so I wrote a function to
>handle the WM_LBUTTONDOWN message for the Dialog resource and then set up
>breakpoints in all three OnLButtonDown functions.  When I clicked down in
>the ListCtrl, none of the functions recognized it!  Am I doing something
>wrong or is there another way to do this?

>Thanks for any help

>Michael



Sat, 14 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. DVD-ROM detection, CD-R Recorder/rewriter detection

2. DVD-ROM detection, CD-R Recorder/rewriter detection

3. background send Lbutton down message

4. LButton Down on a button

5. Copying Selected Item from listctrl to 2nd listctrl

6. A collection inside a collection inside a collection...

7. Newbie::Howto Resize gridcontrol inside a property page inside a view

8. Images for Subitems in a ListCtrl, alternative for ListCtrl?

9. How to Update One ListCtrl when an item Of another ListCtrl is selected?

10. mouse movement detection

11. Detection of pure virtual function?

12. Memory Leak detection in VC7

 

 
Powered by phpBB® Forum Software