CListBox and Right Mouse button 
Author Message
 CListBox and Right Mouse button

Hi,

I have a list box, and am processing selections
made from it with the left mouse button. I need
to trap right mouse clicks selections for alternate
processing.

Is this possible ? Class Wizard doesn't seem
to give me an option to process the RMB message.

Also, if I process a double-click, ClistBox.GetCurSel()
returns LB_ERR, and the list box is single selection !

Any Ideas

Thanks

Andy



Sat, 03 Mar 2001 03:00:00 GMT  
 CListBox and Right Mouse button
Try to derive your a class from CListBox and overwrite the OnRButtonDown
Function then. This is where you can process your code. Then get a pointer
to your listbox and cast it into your derived class. Now it should react on
your right mousebutton.

Lars


Quote:
>Hi,

>I have a list box, and am processing selections
>made from it with the left mouse button. I need
>to trap right mouse clicks selections for alternate
>processing.

>Is this possible ? Class Wizard doesn't seem
>to give me an option to process the RMB message.

>Also, if I process a double-click, ClistBox.GetCurSel()
>returns LB_ERR, and the list box is single selection !

>Any Ideas

>Thanks

>Andy



Sat, 03 Mar 2001 03:00:00 GMT  
 CListBox and Right Mouse button
Trap WM_CONTEXTMENU instead
Quote:

>made from it with the left mouse button. I need
>to trap right mouse clicks selections for alternate
>processing.



Sat, 03 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Right button mouse click in CListBox

2. [Fwd: Right mouse button and depressed button]

3. How to use the right and middle mouse buttons

4. Treeview: Right Mouse Button

5. x and y coordinates when i click right mouse button

6. Right mouse button click in CTreeView?

7. Toggling the mouse buttons from right to left

8. Selection in tree with right mouse button

9. Select Listbox item by right (!)mouse button pressing

10. Pop up menu has my program (Right Mouse Button)

11. Overwriting Right Mouse Button click of edit boxes

12. Popup menu clicking the right mouse button

 

 
Powered by phpBB® Forum Software