I'm really sorry to bother you with my question which has been bothering me (and many others, too) all day long.
It's about calling the shell context menu in custom programs. The MSDN claims that the IShellFolder.GetUIObjectOf(,,IID_IContextMenu) would work with multiple input PIDLs but it seems not so! I've googled for a long time without seeing any guy giving the second parameter (the length of the PIDL array) greater than 1.
However, I've noticed that in TotalCommander a context menu for multiple items was implemented perfectly so I just can't help my curiosity to that. It would be nice to have your advices for that.
Technical question about GetUIObjectOf and IContextMenu
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, it works. You have to either
- use PIDLs relative to the IShellFolder from which you call the above function. The PIDLs must be all only 1 level deep, no subfolders.
I'm using ShellAllocMem to allocate the space where the PIDLs are stored.
- use PIDLs relative to the IShellFolder from which you call the above function. The PIDLs must be all only 1 level deep, no subfolders.
I'm using ShellAllocMem to allocate the space where the PIDLs are stored.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com