Right button mouse click in CListBox 
Author Message
 Right button mouse click in CListBox
G'day all,

I am using a multiselection CListBox in a modal dialog, in which I want
to show a number of CStrings.

My question: Is there a way to show a little pop-up menu when I click
the right mouse button inside the list box? The menu would have the
entries "Select All" and Select None" and choosing one of them would do
exactly what they say.
It would be a rather nifty solution having a menu instead of two visible
buttons...

Please help!

Kind regards,
Martin



Sat, 07 Jun 2003 18:11:34 GMT  
 Right button mouse click in CListBox

Quote:
>My question: Is there a way to show a little pop-up menu when I click
>the right mouse button inside the list box?

Martin,

Handle the WM_CONTEXTMENU message and use TrackPopupMenu.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 07 Jun 2003 19:10:52 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CListBox and Right Mouse button

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

3. Right mouse button click in CTreeView?

4. Overwriting Right Mouse Button click of edit boxes

5. Popup menu clicking the right mouse button

6. howto track a right mouse click from a dialogbar button

7. Dispatching right mouse click for a toolbar button

8. Right mouse button click in CTreeView?

9. Right mouse button click in CTreeView?

10. Help: Detect when right button is clicked above a button

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

12. Right-click in CListBox

 

 
Powered by phpBB® Forum Software