如何在 Visual C 中设置程序的图标2008 精简版?
我想将可执行控制台程序的嵌入图标设置为自定义图标。
我知道这与 这里是这个,但我使用的是 Visual C++ 2008 Express Edition,资源视图不可用(并且 Project-context-menu->Add->Resource... 是变灰),所以我在这里不知所措。我是否必须升级到专业版才能完成这样的基本任务?
I want to set the embedded icon for my executable console program to a custom icon.
I know this is pretty much the same question as this one here, but I'm using Visual C++ 2008 Express Edition, and the Resources View is not available (and the Project-context-menu->Add->Resource... is grayed out), so I'm at loss here. Will I have to upgrade to a pro edition for such a basic task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您仍然可以在 Express 版本中添加资源,但没有资源编辑器 GUI,您必须使用外部工具自己创建资源。
Win32 Platform SDK 有一个 资源编译器 (rc.exe ) 将编译一个资源脚本,它只是一个文本文件你可以自己写。如果您不想手动创建文件,还有免费的资源编辑器。
过程是:
You can still add a resource in Express edition, but there is no resource editor GUI, you have to create the resource yourself using external tools.
The Win32 Platform SDK has a resource compiler (rc.exe) that will compile a resource script which is just a text file that you can write yourself. There are also free resource editors out there if you'd rather not create the file by hand.
The process is:
好吧,在您的项目文件夹中,您应该已经有一个名为的已编译资源文件
“应用程序.rc”
如果您使用文本编辑器打开它,您应该找到以下行:
只需将“app.ico”替换为您的图标的文件名,嘿,魔法就完成了。
Well, in your project's folder you should already have e compiled resource file called
"app.rc"
if you open it with a text editor you should find the lines:
just replace "app.ico" with your icon's filename and hey presto the magic's done.