I'm just curious about this, as it's probably too much trouble to be worth it for me. I'm wondering how it's possible to have each file of a custom type have a different, descriptive icon in windows explorer. A classic example it Photoshop's .psd files. Windows doesn't natively have a clue what a psd is (I assume?), but somehow, when browsing in Windows, the file icon is a thumbnail of the psd itself.
How is this done? I'm curious both from a programming perspective and OS perspective. For example, when Windows sees .psd, what does it do to get the thumbnail? Does Adobe install some separate utility in a magic location that Windows uses to generate the thumbnail for the file?
This is done via Shell Extension Handlers , to see how its done , see Creating Icon Handlers .
It's done with something called a shell extension. In the case of the .psd files Photoshop probably installs a small DLL which is loaded by the shell to display the thumbnails on demand. The shell extension knows how to read the .psd file to get a thumbnail which may even have been stored in the file when it was saved as an optimisation.
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