ThePrzemo996
ThePrzemo996

Reputation: 39

A universal way of getting file and folder icons in Windows

I am writing the AutoHotkey script and would like to display the contents of the directory along with the icons. Everything I found, says that getting icons requires the use of many different winapi functions to get icons for: folders, exe files, files associated with programs, etc. Is there a DLL, winapi function or AuoHotkey library that has a universal interface for many file types?

Upvotes: 2

Views: 139

Answers (1)

Anders
Anders

Reputation: 101626

SHGetFileInfo can extract a HICON and/or give you the system image list index of a path or PIDL.

Get a IExtractIcon from a IShellFolder and use the GIL_ASYNC flag if you need to do the extraction on a background thread.

Upvotes: 6

Related Questions