I am looking for a C/C++ code which can get icon for a given filetype (eg. .doc, .pdf) on Windows. I need to make an application which will display a list of files and I need to have the file icons corresponding to those files.
I have seen C# code for the same but I have never worked with C# and don’t think that I can use the same code for my use.
Please help!
I’ve found this: http://msdn.microsoft.com/en-us/magazine/cc301425.aspx
So you basically call
SHGetFileInfowith SHGFI_USEFILEATTRIBUTES and any file name/path (it doesn’t matter if it doesn’t exist), and it writes the filetype info to aSHFILEINFO.