开发者

Problems with getting my Icon to show up in VS 2008

开发者 https://www.devze.com 2023-01-23 17:39 出处:网络
I have searched on this forum and haven\'t been able to find a solution to my problem. I have been trying to add an icon for my program to show up on the taskbar and for the exe but everything I\'ve

I have searched on this forum and haven't been able to find a solution to my problem.

I have been trying to add an icon for my program to show up on the taskbar and for the exe but everything I've tried has been failing.

I have gone to resource view and added my icon as a resource. the rc file came up but when I compile it nothing changes. There is no new icon on the taskbar or on the exe. According to the other answers here that's all I needed to do. I am so lost on why this isn't wo开发者_运维技巧rking.

Thanks for your help.


First, create an ICO format bitmap file that contains the icon image. This can be done with e.g. Visual Studio: Select "File|New...", then select the "File" tab in the dialog that appears, and choose "Icon".

Store the ICO file in your application's source code directory, for example, with the name, "myappico.ico". Then, create a text file called e.g. "myapp.rc" in which you put a single line of text:

IDI_ICON1               ICON    DISCARDABLE     "myappico.ico"

Add both icon and rc files in your Resource Files folder of visual studio & recompile your project.

Ref : http://doc.trolltech.com/3.3/appicon.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号