Programmatic Icon Replacement

Hello All,

I am working on a custom installation suite and I have run into a slight problem. I would like to be able to build my installer and programmatically replace it's executables icon without having to rebuild it.

I have tried reading the .ico file into a buffer and using BeginUpdateResource, UpdateResource, EndUpdateResource with the type of RT_ICON. It seems this is not working.

I had a similar problem with replacing/adding BITMAP resources and the solution wound up being that I had to remove the BITMAPFILEHEADER from the data buffer that i loaded the bitmap into. I am wondering if there is something similar for ICO files.

Any information would be greatly appreciated.

Thanks in advance!

[717 byte] By [MikeF00] at [2007-12-28]

Software Development for Windows Vista

Site Classified