Forum > Windows
IExplorerCommand shell extension
WayneSherman:
--- Quote from: rpetges on December 22, 2023, 09:56:07 pm ---With Windows 11, Microsoft implemented changes regarding extending context menus. In fact, old shell extensions based on IContextMenu are now legacy and no more displayed in the context menu's root, but in a 'Show more options' sub-menu.
New shell extensions should be build with IExplorerCommand but no examples can be found.
--- End quote ---
Translation of IExplorerCommand from (older?) ShObjIdl.h
https://github.com/CMCHTPC/WindowsAPI/blob/master/Units/Win32.ShObjIdl.pas#L4220
MS Docs (IExplorerCommand is apparently defined in Shobjidl_core.h now)
https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-iexplorercommand
Examples of use:
https://www.google.com/search?q=IExplorerCommand+examples
https://www.google.com/search?q=IExplorerCommand+examples+windows+11
jcmontherock:
Find an example which works with W11/64...
d7_2_laz:
@jcmontherock, as one who don't has Win11 yet but would like to be prepared, i appreciate your sample a lot!
Anyhow, hm, i'm wondering as i don't recognize - regarding the essentials - much differences between this approach
and the code sample from ASerge (Win resp. Win10) as mentioned via link earlier (reply #3 here).
https://forum.lazarus.freepascal.org/index.php/topic,53996.msg400431.html#msg400431
Eg. both are using IID_IContextMenu, IContextMenu(2,3). - See uSysContextMenu.zip within this link.
For to shorten this up: if you say your sample works in Win11 like in Win10, this sounds very good!
Moreover, i'd be intereted to see where user defined functions added to the menu (via AppendMenu) will appear (is this what had been called "shell extensions" earlier?? Not sure).
Will it appear within the main popup, or will it be sunken within "More ..." ?
Could you or anybody other interested could attach an image how that will look when generated on Win11?
One might use this little modification of your test project attached.
jcmontherock:
I do not have Win10. So I can't test it.
Yes, your example works fine.
d7_2_laz:
Screenshot (when project compiled & run on Win11) would look similar to mine?? That’s really fine …. :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page