I have a TJumpList
in my Delphi application, which is a single EXE. I would like to use icons saved to the app's resources as JumpList icons.
TJumpList
only accept a TFileName
string for the icon's path.
Is there any way to use a resource icon in this way, without having external icon files, or extracting resources externally at runtime?
I have tried to load from resource, but it seems it only accepts a string which is a path to an icon file.
Internally, TJumpListItem
uses the Win32 IShellLink
COM interface. That interface does not support using an icon via a resource, only via a file path.
However, that interface does allow for specifying an icon index within an executable (EXE or DLL) file. But, TJumpListItem
is hard-coded to always use index 0, no matter what kind of file is being used. There is already an open ticket about that:
RSP-21558: IconResourceIndex not avalaible in TJumpListItem (TJumpList)