Right-click in CListBox 
Author Message
 Right-click in CListBox
When right-clicking a file in Windows Explorer, a popup menu appears with a
choice of actions to select from. Is there a way to make my program call
that popup menu when right-clicking a line (which is a file name) in a
CListBox ? (I'm using VC++6 sp5, Win2K).

Thanks,
Mel



Sat, 21 May 2005 17:35:12 GMT  
 Right-click in CListBox
Subclass the CListBox, add a OnRButtonDown handler, pop up your own menu using
TrackPopupMenu.
                                joe

Quote:

>When right-clicking a file in Windows Explorer, a popup menu appears with a
>choice of actions to select from. Is there a way to make my program call
>that popup menu when right-clicking a line (which is a file name) in a
>CListBox ? (I'm using VC++6 sp5, Win2K).

>Thanks,
>Mel

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Sat, 21 May 2005 18:11:42 GMT  
 Right-click in CListBox
You will need to use the shell to get the menu contents.  It is a bit of
work, but doable.  Here is a link to lots of information about Shell
Programming...

http://www.codeproject.com/shell/

Tom


Quote:
> When right-clicking a file in Windows Explorer, a popup menu appears with
a
> choice of actions to select from. Is there a way to make my program call
> that popup menu when right-clicking a line (which is a file name) in a
> CListBox ? (I'm using VC++6 sp5, Win2K).

> Thanks,
> Mel



Sat, 21 May 2005 18:27:26 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Handle right-click in CListBox & create pop-up menu ?

2. Handling a right click message in a CListBox box control

3. Right button mouse click in CListBox

4. (Q) Detecting right click in a CListBox

5. can clistbox respond to right click

6. CListBox and Right Mouse button

7. Multi CListBox using double-click selection

8. CListbox Double Clicking

9. Scrollbar clicks do nothing for CListBox - derived class

10. double click in extended select CListBox

11. Handling a Right Click

12. Right Click vs. Left

 

 
Powered by phpBB® Forum Software