Showing a Windows context menu for multiple items
问题 I have an application that lists files, and I allow the user to right-click on a file and my application shows the Windows context menu for the selected file. I use SHParseDisplayName to get a pidl for a filename. Then I bind to the parent object: IntPtr pidlLast = IntPtr.Zero; SHBindToParent(pidl, typeof(IShellFolder).GUID, out oShellFolder, out pidlLast); After I have the parent I can get build the context menu: IntPtr result = IntPtr.Zero; IShellFolder shellFolder = (IShellFolder