简体   繁体   English

无论Windows版本如何,.exe文件的默认图标

[英]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. 我在列表视图中显示了一堆exe文件,我想显示它们的默认图标,但如果exe文件没有图标资源,我想显示Windows默认应用程序图标,而不管操作系统版本。 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. 默认值为“%1”,这是exe文件本身的第一个图标。 But where is the default .exe icon for exe files with no icon? 但是没有图标的exe文件的默认.exe图标在哪里?

This is what XP does (this is actually a shortcut, but you get the point) 这就是XP所做的(这实际上是一个捷径,但你明白了)

样品

It's been awhile; 有一阵子了; but doesn't shell32 handle this? 但是shell32不处理这个吗?

Here's an older article from stackoverflow 这是stackoverflow的一篇较旧的文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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