如何在Visual Studio 2012(C ++)中更改默认的.exe图标 [英] How can I change the default .exe icon in Visual Studio 2012 (C++)

查看:1181
本文介绍了如何在Visual Studio 2012(C ++)中更改默认的.exe图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一种方法来改变VS2012在编译我的应用程序时的默认图标。只是对于那些想知道,我试图改变.exe程序的图标,而不是窗口左上角的窗口图标和开始菜单。我已经知道如何做到。我一直在谷歌这永远,它总是显示如何更改窗口图标,而不是实际的文件的图标。非常感谢!

I was wondering if there was a way to change the default icon that VS2012 makes when I compile my app. Just for those wondering, I am trying to change the .exe program's icon, not the window icon at the top left of the window and on the start menu. I already know how to do that. I have been Google-ing this for ever and it always shows up how to change the window icon, not the actual file's icon. Thanks in advance!!!

编辑:这是我想要的...

This is what I want to do...

替换此...

使用此...

]

谢谢,希望这澄清。

推荐答案


  1. 在C ++项目的资源部分添加一个图标。此图标将显示为可执行文件的应用程序图标。 [注意:请确保您在资源视图窗口中,而不是解决方案资源管理器窗口。然后右键单击rc文件夹添加资源...]

  1. Add an icon in the resource section of you C++ project. This icon will be shown as an Application icon for your executable. [Note: make sure you are in the Resource View window, not the Solution Explorer window. Then right-click on the rc folder to Add Resource...]

我试过这个与Win32控制台应用程序,它显示在资源管理器中的图标应用程序图标。

I have tried this with Win32 Console Application and it shows the icon in the Explorer as Application Icon. This should work with other types of applications also.

请注意,添加图标时,您需要为图标添加不同大小的图片,如16 * 16, 32 * 32。这些不同的图标图像将被Windows资源管理器用于在不同的视图模式(小图标,中图标,目标图标,超大图标等)中显示应用程序图标。

Also note that while adding the icon you need to add different size images for the Icon like 16*16, 32*32. These different icon images will be used by Windows Explorer to display Application Icon in different View Modes(Small Icons, Medium Icons, Larget Icons, Extra Large icons etc.)

这篇关于如何在Visual Studio 2012(C ++)中更改默认的.exe图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆