I am trying to create a shortcut to my GUI app in C++, compiled with Visual Studio. I’m using IShellLink::SetIconLocation method to create the link that takes icon index. But the question is how do I get this index when all I have is my icon ID from .res file?
#define IDR_ICON_CLEAR 130
Try using the negative value of the resource ID, ie -130. Take a look at this article that explains how you can get the icon by its resource ID.