I apologize if this has already been answered. I looked and looked, and I can’t find anything like what I want, which I find very amazing. Please feel free to give me "This has already been set" with a link ... :(
I am in the early stages of creating a program in C #. In the main window there will be a list of files related to my application. I currently have them in a list, although I can switch widget types if necessary. I would like the user to right-click on one or more file names that will lead to the same context menu as in Explorer. Using, for example, "Open", "Change", "Print", etc.
Obviously, I could put the stuff into the context menu manually, but I would like it to have the same options as in Explorer. There will be Word documents and text files, as well as various other options. I don’t know how the list of actions is populated in the standard Windows context menu, especially considering that the list changes depending on the selected file type and whether more than one file is selected.
I can provide the code if necessary, although I have nothing interesting so far.
So, my questions are: how to get a list of actions that you get when you right-click on a file or group of files in Explorer? Is there a windows API that I can name? Or can I combine the options that I read in the registry? And if so, what am I reading? Or what?
As a bonus, I would like to add some of my own commands to the menu only in my own application. Basically, all I can find is how to write the extension in the context menu so that I can add an action that always appears when I click on a specific file type. This is NOT what I want. This is a bonus though, and I can always add buttons or a drop-down menu or something in this case if it doesn’t work or requires heroic coding.
source share