Fastest way to get shell icon

前端 未结 2 609
清歌不尽
清歌不尽 2020-12-30 12:49

I\'m using this code for getting the shell icon (the one displayed in Windows Explorer).
Does anyone has an experience with a faster way to get these icons ? The S

相关标签:
2条回答
  • 2020-12-30 13:23

    I have used a cache when I used SHGetFileInfo. Unless it is an .exe or .ico file (and perhaps a few more) the icon will be the same for the same file extension, so when you show a dir list you can use the same icon for files of the same type and you don't have to call (and wait for) SHGetFileInfo again.

    0 讨论(0)
  • 2020-12-30 13:30

    Try using the SHGFI_USEFILEATTRIBUTES flag as well. See the articles Tuning SHGetFileInfo for Optimum Performance and What does SHGFI_USEFILEATTRIBUTES mean? for more information.

    0 讨论(0)
提交回复
热议问题