I am using the SHGetFileInfo api to get a handle to and display the icon associated with a particular file.
If the file has no icon associated with it Windows will return you the default one that it uses in explorer for unknown file types. In this case I don't want to display the icon.
How can I tell if the file has no associated icon and Windows is giving me back the default one?
On my system SHFILEINFO.iIcon
is always equal to 3 in this case but i'm not sure how reliable that is and I expect there is a better way to check this.
Edit: I am targeting Windows XP and upwards
Thanks