Click here to Skip to main content
13,052,956 members (64,550 online)
Rate this:
Please Sign up or sign in to vote.
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 11-Mar-11 5: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. :)
SAKryukov 11-Mar-11 12:50pm
Good, my 5.
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,
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! :)
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 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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 11 Mar 2011
Copyright © CodeProject, 1999-2017
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