popup menu on Windows explorer
-
Are you referring to associating file types with a program? This link might help: msdn link
it doesn't talk about context help menu of Windows explorer. includeh10
-
when we right-click on Windows explorer, we can see a popup menu. How to add my app on the menu? I should be something about register, what is that? thx includeh10
Michael Dunn has written some excellent articles here on CodeProject about this topic - trying looking for his articles. What you require is a 'shell extension'. -- Andrew.
-
Michael Dunn has written some excellent articles here on CodeProject about this topic - trying looking for his articles. What you require is a 'shell extension'. -- Andrew.
Andrew, thanks. i did read part of his articles (1-9) before - all are in COM. i really don't like COM. i think there must be simple way to do that - may be we just need to modify register, similar to doing for double-clicking a file. cheers includeh10
-
when we right-click on Windows explorer, we can see a popup menu. How to add my app on the menu? I should be something about register, what is that? thx includeh10
Which file type's context menu are you interested in modifying?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
it doesn't talk about context help menu of Windows explorer. includeh10
-
Which file type's context menu are you interested in modifying?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
when we right click a file in Explorer, the munu pops up. we can see WinZip or "Send to" folder on it. file extension can be any, i.e. .mytype or .class includeh10
-
when we right click a file in Explorer, the munu pops up. we can see WinZip or "Send to" folder on it. file extension can be any, i.e. .mytype or .class includeh10
There is no single way to do this. If you are wanting to add to a context menu that already exists (e.g., the one that pops up when you right-click a .dll or .cda file), you have one set of steps. For example, if you wanted to add to the context menu of a .dll file, you could save the following to a .reg file and merge it into the registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dllfile\shell\Calc]
[HKEY_CLASSES_ROOT\dllfile\shell\Calc\command]
@="c:\\winnt\\system32\\calc.exe"If you are wanting to create a new context menu for an extension not yet registered (e.g., .mytype), you have a different set of steps.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
There is no single way to do this. If you are wanting to add to a context menu that already exists (e.g., the one that pops up when you right-click a .dll or .cda file), you have one set of steps. For example, if you wanted to add to the context menu of a .dll file, you could save the following to a .reg file and merge it into the registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dllfile\shell\Calc]
[HKEY_CLASSES_ROOT\dllfile\shell\Calc\command]
@="c:\\winnt\\system32\\calc.exe"If you are wanting to create a new context menu for an extension not yet registered (e.g., .mytype), you have a different set of steps.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
DavidCrow, thanks. does "a different set of steps" mean i must use COM as suggested in previous replies? includeh10
-
DavidCrow, thanks. does "a different set of steps" mean i must use COM as suggested in previous replies? includeh10
Not necessarily. What do you have against COM anyhow?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
Not necessarily. What do you have against COM anyhow?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
i am very interested in the method of "Not necessarily", any comment about it? cheers includeh10
-
i am very interested in the method of "Not necessarily", any comment about it? cheers includeh10
It requires just a few more entries in the .reg file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.mytype]
@="MyType.Document"[HKEY_CLASSES_ROOT\MyType.Document]
[HKEY_CLASSES_ROOT\MyType.Document\shell]
[HKEY_CLASSES_ROOT\MyType.Document\shell\Calc]
[HKEY_CLASSES_ROOT\MyType.Document\shell\Calc\command]
@="c:\\winnt\\system32\\calc.exe"As has already been mentioned, this sort of stuff is explained in Michael Dunn's shell articles.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
It requires just a few more entries in the .reg file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.mytype]
@="MyType.Document"[HKEY_CLASSES_ROOT\MyType.Document]
[HKEY_CLASSES_ROOT\MyType.Document\shell]
[HKEY_CLASSES_ROOT\MyType.Document\shell\Calc]
[HKEY_CLASSES_ROOT\MyType.Document\shell\Calc\command]
@="c:\\winnt\\system32\\calc.exe"As has already been mentioned, this sort of stuff is explained in Michael Dunn's shell articles.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
you are talking about how to use double-clicking of a kind of file. i modified register as your comment, but i saw nothing on popup menu of Explorer. when i double clicked some.mytype, calculator was running. it is not right answer of my question. i read Michael Dunn's articles again, i can not find hint about my question. he added a program to menu folder "send to" of popup menu of Explorer by ::SHGetSpecialFolderLocation(0,CSIDL_SENDTO,&pidl) i will try to get answer from that point. cheers includeh10
-
you are talking about how to use double-clicking of a kind of file. i modified register as your comment, but i saw nothing on popup menu of Explorer. when i double clicked some.mytype, calculator was running. it is not right answer of my question. i read Michael Dunn's articles again, i can not find hint about my question. he added a program to menu folder "send to" of popup menu of Explorer by ::SHGetSpecialFolderLocation(0,CSIDL_SENDTO,&pidl) i will try to get answer from that point. cheers includeh10
includeh10 wrote: when i double clicked some.mytype, calculator was running. When you right-clicked an item that had a .mytype extension, you should have seen Calc at the top of the context menu. The fact that it was bold meant that it was the default option. That's why double-clicking the item started the calculator. My example was merely that - an example. You may need to extrapolate from the examples to get what you want. Not all shell items are the same so there is no one-size-fits-all solution.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
includeh10 wrote: when i double clicked some.mytype, calculator was running. When you right-clicked an item that had a .mytype extension, you should have seen Calc at the top of the context menu. The fact that it was bold meant that it was the default option. That's why double-clicking the item started the calculator. My example was merely that - an example. You may need to extrapolate from the examples to get what you want. Not all shell items are the same so there is no one-size-fits-all solution.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
DavidCrow, i think maybe something is wrong with my test. @=mytype.document what does it exactly mean under key of .mytype? if we open regedit, it looks name ------------ data default --------- @=mytype.document or @ --------------- mytype.document or other format?? cheers includeh10