Click to See Complete Forum and Search --> : how can i get file or folder icon?


mismael85
April 18th, 2009, 04:47 PM
i have used ExtractAssociatedIcon function but i found that this function get the icon from an exe file or a resource file.

how can i get any file or folder's icon?

golanshahar
April 20th, 2009, 06:26 AM
Did you try ::SHGetFileInfo() (http://msdn.microsoft.com/en-us/library/bb762179(VS.85).aspx) ? it has the SHGFI_ICON flag in which you can retrieve the icon handle.

Cheers