picture

Just wanna ask, can I change the icon of my c++ program? from the default .exe icon?
You have to create a resource file then add it to your project. It works in code::block and visual studios for sure not sure about other IDE's

*edit here is an exmaple.

In code::block

1)hit ctrl-shift-n( or file->new->empty file ).
2)save it as something like resource.rc it should then ask you to add to current project if you have one open hit yes.
3)Put something like this
1
2
3
4
5
6
#ifndef RESOURCE_RC
#define RESOURCE_RC

MAINICON ICON "myicon.ico"

#endif 

4)create an icon and place it in the same directory as the resource file
5)if you did not add to the project already add to it now.
6)run the .exe
Last edited on
thanks guys !
Topic archived. No new replies allowed.