使用LoadIcon获取现代系统图标 [英] Getting modern system icons with LoadIcon
问题描述
我正在使用 LoadIcon
用于加载系统图标,例如注意"标志.效果很好,但这使我的图标具有旧的(我认为)Windows 7外观.
我的程序在Windows 10上运行.
代码:
hicon = LoadIcon(NULL, IDI_EXCLAMATION);
有没有办法使图标具有新外观?
另一方面, MessageBox
与MB_ICONEXCLAMATION
标志一起显示新图标.
我看到MessageBoxW
使用LoadIcon
for loading system icons such as the "Attention" sign. This works fine, but this gives me the icon with the old (I think) Windows 7 look.
My program runs on Windows 10.
Code:
hicon = LoadIcon(NULL, IDI_EXCLAMATION);
Is there a way to get the icons with the new look?
On the other hand MessageBox
with the MB_ICONEXCLAMATION
flag shows the new icon.
I saw that MessageBoxW
uses the LoadIconWithScaleDown
function for loading icons instead of LoadImage
or LoadIcon
. With standard icon IDs (from 0x7f00 (IDI_APPLICATION..IDI_SHIELD
) this function actually loads images from imageres.dll (while LoadImage
loads them from user32.dll).
这篇关于使用LoadIcon获取现代系统图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!