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
精彩评论