开发者

How to get a filetype icon in Windows using C/C++?

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 tho开发者_如何转开发se 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 SHGetFileInfo with SHGFI_USEFILEATTRIBUTES and any file name/path (it doesn't matter if it doesn't exist), and it writes the filetype info to a SHFILEINFO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜