Win32:更改程序图标
我最初决定 IDI_ICON1 非常适合我的程序:
wndclass.hIcon = LoadIcon (HINST_THISCOMPONENT, MAKEINTRESOURCE(IDI_ICON1));
然后该图标出现在我的主窗口和 Windows 资源管理器中的 .exe 文件的标题菜单的左上角。
我决定我更喜欢IDI_ICON2,所以我改变了:
wndclass.hIcon = LoadIcon (HINST_THISCOMPONENT, MAKEINTRESOURCE(IDI_ICON2));
现在icon2出现在标题菜单的左上角,但Windows资源管理器中的图标仍然显示为icon1。我缺少什么?
I had originally decided that IDI_ICON1 would be a good fit for my program:
wndclass.hIcon = LoadIcon (HINST_THISCOMPONENT, MAKEINTRESOURCE(IDI_ICON1));
The icon then appeared in the top left of the title menu for my main window and for the .exe file in Windows explorer.
I decided I liked IDI_ICON2 better, so I changed:
wndclass.hIcon = LoadIcon (HINST_THISCOMPONENT, MAKEINTRESOURCE(IDI_ICON2));
Now icon2 appears in the top left of the title menu, but the icon in Windows explorer is still shown as icon1. What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
资源管理器采用可执行文件中的第一个图标。那将是 id 最低的那个。尝试管理您的资源,以便将 IDI_ICON2 定义为比 IDI_ICON1 更小的整数。
Explorer takes the first icon in your executable. That will be the one with the lowest id. Try managing your resources so that IDI_ICON2 is defined to be a lower integer than IDI_ICON1.