What's the difference between CopyIcon and DuplicateIcon?
UPDATE: Apparently, CopyIcon and DuplicateIcon in fact do identical things (save for the function signature. The information below was written more than a year prior to that particular blog post, however it is based on official documentation. While Raymond Chen is an expert, his blog is explicitly not official documentation. It shouldn't hurt to use either function, however.
According to Icon Duplication section in the About Icons article in the MSDN docs
The CopyIcon function copies an icon handle. This enables an application or DLL to get its own handle to an icon owned by another module. Then, if the other module is freed, the application that copied the icon will still be able to use the icon.
...
The DuplicateIcon function makes an actual copy of the icon.
It follows from these descriptions that you should use CopyIcon() when you don't need to modify the icon, but need a handle to it. Use DuplicateIcon() if you intend to modify it.
There's actually a method to MSDN's madness. Almost all the MSDN documentation is separated into three sections:
where [topic] could be something like Icons, for example.
The "[topic] Reference" sections is a summary of all the functions and structures that are relevant to [topic]. If they don't answer your question about a function, you may have better luck with the "About [topic]" and/or "Using [topic]", which goes into more detail about [topic].
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With