Question:
I've created a resource file to hold my icons. I have two. One refers to my exe, and the second refers to document files created by the exe. The document files have their own extension, and they open my exe and feed the file to the exe.

The trouble is that I don't know how to refer my document files to their icon in the resource file. My exe icon has an index of 101 and my document icon uses 102.

So, how do you refer to those index numbers after the exe is compliled? Does 101 become 0, and 102, 1? That seems logical, but it doesn't work. The only way I've been able to make the reference is to refer the registry to the path and name of the ico file. This works, but I'd rather refer it to the resource file because it's invisible and the user won't be able to accidentally move my ico file.

Do I need to use ExtractIcon? Which one? If so, how do feel the icon image to the registry after I extract it?

The MSDN seems rather vague about this.

Any ideas?

Thanks!

Will