How do I set the executable icon for my C++ application in visual studio 2008?
First go to Resource View (from menu: View --> Other Window --> Resource View). Then in Resource View navigate through resources, if any. If there is already a resource of Icon type, added by Visual Studio, then open and edit it. Otherwise right-click and select Add Resource, and then add a new icon.
Use the embedded image editor in order to edit the existing or new icon. Note that an icon can include several types (sizes), selected from Image menu.
Then compile your project and see the effect.
See: http://social.microsoft.com/Forums/en-US/vcgeneral/thread/87614e26-075c-4d5d-a45a-f462c79ab0a0
This is a slight aside, but if you're looking for a good icon editor you might like to try Axialis IconWorkshop Lite, a free plug-in for Visual Studio 2008
The important thing is that the icon you want to be displayed as the application icon ( in the title bar and in the task bar ) must be the FIRST icon in the resource script file
The file is in the res folder and is named (applicationName).rc
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
(icon ID ) ICON "res\\filename.ico"
In the solutions explorer right click your program and select properties. Under the resource section select Icon and manifest, then browse to the location of your icon.
Hi, I'm trying to set my application icon but it's not working fine.
I've set it using the resource editor, and now I have this line in my .rc file:
IDI_ICON1 ICON "images\\machs5.ico"
When I compile the project, the '.exe" file is OK, with the icon showing correctly. However, when I run the application, that icon is not shown neither in the title bar nor in the task bar... :(
Any ideas of what I'm doing wrong?