Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two questions. My first one is, that how can i "put" something into the default windows right click pop-up menu? I mean, if i click with the right mouse button on an .exe, then the default things appers(like cut, copy, send to, run as...), but how can i put there one extra line, like "MyApp", which will start my application? I want to do all this in c++. My second question is, how can i get the filename and file adress (or the full path) on which i have started MyApp from the pop-up menu?

I'm not professional in C++ and need your guidance ... please explain your way.

Thank in advance!
Posted

What you need is called Context Menu Shell Extension.
There are excellent articles on Shell Extension in CodeProject.

I recommend you to check out this[^] article series. In Part 1[^] and Part 2[^] you will find very useful information. :)
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Mar-11 12:50pm    
Good, my 5.
--SA
Nuri Ismail 12-Mar-11 11:27am    
These series helped me a lot to understand Shell Extensions.
I believe they will help the OP too. :)

Thanks again for the support SA!

Best Regards,
Nuri
Espen Harlinn 13-Mar-11 7:30am    
Those articles are quite good, my 5
Nuri Ismail 14-Mar-11 6:22am    
Much appreciated! Thank you! :)
1. What you want is a shell extension, which is how you add items to the Windows Explorer context menu. Search here on Codeproject and you will find articles describing this.

2. To get the file path of your exe, call the Win32 function GetModuleFileName(). MSDN has details.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Mar-11 12:51pm    
The answer does not deserves 1; who was so clever to vote like that.
My vote is 5.
--SA
Nuri Ismail 12-Mar-11 11:29am    
SA is right, this is a good answer and does not deserve 1. My 5.
Espen Harlinn 13-Mar-11 7:31am    
Good points, my 5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900