开发者

How to customize windows default right click pop-up menu

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 w开发者_JS百科ith 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 (or the full path) on which i have started MyApp from the pop-up menu?

Thank in advance!

kampi


Check this stackoverflow post: Adding item to the Desktop context menu in Windows

Such a handler must be registered in HKCR\Directory\Background, instead of usual locations like HKCR\Directory, HKCR\Folder, etc.

Check out Creating Shell Extension Handlers in MSDN.

There's a series of articles on CodeProject that details writing Shell Extensions and is very good:

http://www.codeproject.com/KB/shell/shellextguide1.aspx


1) Sounds like you're looking to simply alter or add to the context menu that is provided by Windows Explorer. It's really just a matter of registry settings. See here for a good example.

2) If you follow the zip example of the link above you'll see that the path to the target file is passed to the zip application. Your application, if it accepts arguments can similarly get the path to the file that is being open.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜