Reputation: 4992
I want to set the embedded icon for my executable console program to a custom icon.
I know this is pretty much the same question as this one here, but I'm using Visual C++ 2008 Express Edition, and the Resources View is not available (and the Project-context-menu->Add->Resource... is grayed out), so I'm at loss here. Will I have to upgrade to a pro edition for such a basic task?
Upvotes: 2
Views: 4091
Reputation: 5559
1. in notepad paste
AAA ICON myicon.ico
2. then save as resource.rc
3. add the resource.rc file to your project.
it works on visual studio, code::blocks and dev-c++
NOTE:
1. myicon.ico is the name of your icon.
2. myicon.ico should be in the same directory as resource.rc
Upvotes: 0
Reputation: 1776
Well, in your project's folder you should already have e compiled resource file called "app.rc" if you open it with a text editor you should find the lines:
// Icon placed first or with lowest ID value becomes application icon 1 ICON "app.ico"
just replace "app.ico" with your icon's filename and hey presto the magic's done.
Upvotes: 0
Reputation: 31394
You can still add a resource in Express edition, but there is no resource editor GUI, you have to create the resource yourself using external tools.
The Win32 Platform SDK has a resource compiler (rc.exe) that will compile a resource script which is just a text file that you can write yourself. There are also free resource editors out there if you'd rather not create the file by hand.
The process is:
Upvotes: 2