I would like to use a custom icon (a .ico file) for an executable, on windows (XP). The executable is a C++ program created thanks to visual studio (2008).
How can I change the icon from the executable, to the .ico file I want?
I would like to use a custom icon (a .ico file) for an executable, on windows (XP). The executable is a C++ program created thanks to visual studio (2008).
How can I change the icon from the executable, to the .ico file I want?
Has mentioned in the comment, it is a duplicate question
Here is a copy paste of the answer from Jason Stevenson:
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.
You can use a program such as Resource Hacker to edit resources (including icons) of Windows executables.
Assuming you have a "resource.h" and a ".rc"-file ,you define a identifier in "resource.h" (lets call it IDI_MY_ICON) and then add a line in the icon-section of your rc-file like IDI_MY_ICON ICON "myicon.ico"
as the first icon (thus this line must preceed any other ICON lines). Rebuild ,that's it.
In C# projects you right clink on project that creates .exe file, select Properties and on the first screen you can set icon. Not sure if this works for C++ but the properties panel is the place that you should look in.
You should be able find it at the 'Properties' of your project. (By rightclicking your project name). It's on the Application Tab, at least, in Visual Studio 2008 working in C# it is, and scrolling down there a bit.