在Visual Studio 2005中更改应用程序图标? [英] Change app icon in Visual Studio 2005?

查看:362
本文介绍了在Visual Studio 2005中更改应用程序图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的游戏的演示版本使用不同的图标,我使用不同的构建配置构建演示,而不是完全验证,使用预处理器定义锁定一些内容,使用不同的图形等。有没有一种方法,我可以使Visual Studio使用不同的图标,在演示配置中的应用程序图标,但继续使用正式图标的完整版本的配置?

I'd like to use a different icon for the demo version of my game, and I'm building the demo with a different build config than I do for the full verison, using a preprocessor define to lockout some content, use different graphics, etc. Is there a way that I can make Visual Studio use a different icon for the app Icon in the demo config but continue to use the regular icon for the full version's config?

推荐答案

根据此页您可以在* .rc文件中使用预处理器伪指令。您应该这样写

According to this page you may use preprocessor directives in your *.rc file. You should write something like this

#ifdef _DEMO_VERSION_
IDR_MAINFRAME ICON "demo.ico"
#else
IDR_MAINFRAME ICON "full.ico"
#endif

这篇关于在Visual Studio 2005中更改应用程序图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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