简体   繁体   中英

Default icon for .exe file regardless of Windows version

I show a bunch of exe files in a listview, and I want to show their default icon, but if the exe file has no icon resource, I would like to show the Windows default application icon regardless of the OS version. If I check the registries at:

 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\DefaultIcon]

the default value is "%1", which is the first icon in the exe file itself. But where is the default .exe icon for exe files with no icon?

This is what XP does (this is actually a shortcut, but you get the point)

样品

It's been awhile; but doesn't shell32 handle this?

Here's an older article from stackoverflow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM