Windows Explorer Context Menu Question
I have a TreeView that represents some files/folders in the Windows file system. i want to be able to right click one and display the standard Windows context menu. The node's tag contains the file path. I have spent 开发者_C百科a fair amount of time researching and I found this: http://www.codeproject.com/KB/cs/shellContextMenu.aspx
However, it seems to be missing the "Rename" item. So I want to get that back..
I also want to know how to handle the functions. For example, if the user renames or deletes a file, I want to remove that node/rename that node accordingly.
I am programming in C#, .NET 4.
You need to include the CMF_CANRENAME flag in the uFlags parameter to IContextMenu.QueryContextMenu to indicate that your host application supports renaming items.
精彩评论