The previous posts about ico formats and files have all been moving towards the end goal, merging two icons into a new single icon. This is useful for things like generating icon overlays and I personally used this method while building an icon overlay shell extension to combine multiple icon overlays into a single icon overlay. This is important because only windows only allows a single icon overlay extension to be “active” per file. So if you need to allow multiple overlays you need to merge the icons yourself and add additional logic to the shell extensions to get the correct result.
Here is a simple command line application that shows how to merge two icons. It takes three parameters,
icoMerge.exe [iconPath1] [iconPath2] [destinationPath]
Full source code is included. It is a combination of the source provided in the preivous ico related posts.
All Code is freely provided, no guarantees or warranties about its quality, use at your own risk.