LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shell32.dll

Does anyone no of a way to return the default icon for a given document using the shell32.dll?
0 Kudos
Message 1 of 4
(3,399 Views)
Hi,

Use ExtractIcon or ExtractIconEx to get the icon resource(s).
Use GetIconInfo to get the pixels.
Use DestroyIcon to destroy all icon resources.

Regards,

Wiebe.

"aduley" wrote in message
news:506500000008000000B4DD0000-1079395200000@exchange.ni.com...
> Does anyone no of a way to return the default icon for a given
> document using the shell32.dll?
Message 2 of 4
(3,399 Views)
Would you happen to have a basic example using the api? Thanks
0 Kudos
Message 3 of 4
(3,399 Views)
Hi,

Well, what do you want from the icon? In windows, it is normal to get a icon
handle. That's easy. If you want the actual pixels, it's not that easy. To
do this you have to create a DIB session, and use GetDIBits to copy the icon
to a buffer. GetDIBits is not easy... I think I have don this once...
Perhaps I can find it, but it's not very likely...

Sorry, it's not very basic, so there is no basic example...

Regards,

Wiebe.


Btw. Use ExtractAssociatedIcon. to get an associated icon...



"aduley" wrote in message
news:506500000005000000C79B0100-1079395200000@exchange.ni.com...
> Would you happen to have a basic example using the api? Thanks
0 Kudos
Message 4 of 4
(3,399 Views)