Hi everyone !

I'd like to train myself to change the icon associated with any *.exe (for instance calc.exe).

It seems that the icon is a part of the EXE itself, which can be reached (and modified ?) using functions such as UpdateResource, (LoadIcon, etc. ?)

Can anybody give me a simple code example using such function to change the icon associated with calc.exe ?

Thank a lot,

Juan.
Posted on 2004-12-06 05:07:22 by Juan
hi Juan,

you are right that the icon is part of the exe itself, stored as a resource inside the file. so in order to change the icon you would want to use such functions as CreateFile, ReadFile and WriteFile. You would have to locate the resource inside the file and change as needed. this would require some knowledge of the pe file format without which it is never a good idea to alter exe files directly.

if you just want to customise the icons of your favourite programs for your own pleasing i'd recommend the use of a resource editor. there is at least one really good one which is even for free.

cheers,
enodev
Posted on 2004-12-07 04:39:41 by enodev