Windows Intergration

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

Hi,

How do you integrate an application into windows, for instance right
clicking a file on the desktop or in a folder brings up a menu of things you
can do (delete, rename, send to..) I wish to add my application to this
context menu.

thanks in advance
 
Lee said:
How do you integrate an application into windows, for instance right
clicking a file on the desktop or in a folder brings up a menu of things you
can do (delete, rename, send to..) I wish to add my application to this
context menu.

Here's an example. Run regedit. Look at

HKEY_CLASSES_ROOT\.txt
This has the value "txtfile". So, look up

HKEY_CLASSES_ROOT\txtfile\shell\open\command
This has the value "%SystemRoot%\system32\NOTEPAD.EXE %1"

In other words, when the user right-clicks on a .txt file, the context
menu shows the verb "Open". And if the user selects Open, then it
invokes the command-line above (substituting the filename for %1).

You can add your own verbs easily. Just create
HKEY_CLASSES_ROOT\txtfile\shell\MyVerb\command
with appropriate stuff in it.
 
Tony Clark said:
what about assigning a context menu to all file types?

I can't remember offhand. But the relevant MSDN topics are:

Extending Shortcut Menus
Shell Basics
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top