Hi Everyone
Ive written a little tool which calculates a CRC32 of a file and now i want to add an entry to the contextmenu which appears, if you right-click an icon in the explorer. Ive already checked out the registry for other programms which use this ability and it seems to work with DLLs. Can anybody give me a clue how to do this ?
Im using WinXP and Visual C++ 5.0.
Thanx,
Mhulla.
Comments
:
: Ive written a little tool which calculates a CRC32 of a file and now i want to add an entry to the contextmenu which appears, if you right-click an icon in the explorer. Ive already checked out the registry for other programms which use this ability and it seems to work with DLLs. Can anybody give me a clue how to do this ?
:
: Im using WinXP and Visual C++ 5.0.
:
: Thanx,
: Mhulla.
:
Try this. Open explorer, then Tools->Folder Options, then select the File Types tab. That gives you a list of the "known" filetypes. Scroll down to the type you want to act on, (for example, .txt), then click "Advanced". Here you can see the options already there, and you can add additional ones by clicking "New" and filling in the name of the action and the path to the program that does it.
Med venlig hilsen,
Adrian...
Thank you, but that is not exactly what i want. First there is no option to add my little tool to every known filetype and second i also want to code an installer which does this automaticaly. I really believe i have to do this in the registry. What i already know is, that there is a key named "HKEY_CLASSES_ROOT/*". There are a few programms, like WinRar which use this key. But they all use DLLs.
Mhulla.
Pheraphs it's not so simple, but it should work.
See this for some info about hooks:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_subclas3.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Hooks/AboutHooks.asp
[hr]
[italic]How beautiful, if sorrow had not made Sorrow more beautiful than Beauty itself.[/italic]
JOHN KEATS
:
: Ive written a little tool which calculates a CRC32 of a file and now i want to add an entry to the contextmenu which appears, if you right-click an icon in the explorer. Ive already checked out the registry for other programms which use this ability and it seems to work with DLLs. Can anybody give me a clue how to do this ?
:
: Im using WinXP and Visual C++ 5.0.
:
: Thanx,
: Mhulla.
:
What you are looking for is called a "Shell Extension". Windows has a set of COM objects to let your hook into the windows explorer. Adding a new item to the file properties menu in explorer happens to be one of them.
Start from here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_extending/extensionhandlers/shell_ext.asp
for the different types of extensions you can add, the one you are probably looking for is "Shortcut menu handler".