Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ C++/CLI
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 11-Mar-11 6:25am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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. Smile | :)
SAKryukov at 11-Mar-11 12:50pm
Good, my 5.
Nuri Ismail at 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,
Espen Harlinn at 13-Mar-11 7:30am
Those articles are quite good, my 5
Nuri Ismail at 14-Mar-11 6:22am
Much appreciated! Thank you! :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.
SAKryukov at 11-Mar-11 12:51pm
The answer does not deserves 1; who was so clever to vote like that.
My vote is 5.
Nuri Ismail at 12-Mar-11 11:29am
SA is right, this is a good answer and does not deserve 1. My 5.
Espen Harlinn at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,580
1 OriginalGriff 8,370
2 Peter Leow 4,859
3 Kornfeld Eliyahu Peter 3,210
4 Maciej Los 2,301

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 11 Mar 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100