Locating the actual associated icon location.
Posted on 1997-08-17
Just started messing with win95 programming, and immediately getting
weird results! Op system or compiler?
My set-up is: Win95 SR2, Borland c++ 5.01.
I'm exploring ways of getting icons from files, and associated icons.
I notice that the associated icon I get with extractassociatedicon is
not the same as the icon I see in explorer, specifically when I view the
borland icons for *.rc, *.cpp files. I can get the large and small icons
using SHGetFileInfo, but when I try to find the exact location (file and
icon index) of the icon in order to just use ExtractIcon, neither
ExtAssIcon nor SHGetFileInfo seem to work as expected.
ExtractAssociatedIcon is supposed to return the file and index that
includes the associated icon, but in my program these parameters are
returned unchanged? Help?
SHGetFileInfo, called with SHGFI_ICONLOCATION should do pretty much
the same thing as ExtractAssociatedIcon, but also doesn't seem to fill
the info structure as expected!
Anyone know anything about this?