I would like to know how to change the icon of my program (console application) from the default whiteboard-thing to an icon of my choice. Any 'n all help is appreciated. Thanks.
--mr0ldie
I would like to know how to change the icon of my program (console application) from the default whiteboard-thing to an icon of my choice. Any 'n all help is appreciated. Thanks.
--mr0ldie
--LiKWiD
Becoming un-noobified one day at a time.
This is more a Windows question, but whatever.
In explorer or on the desktop, your exe's icon is the first icon resource in the exe file. The icon of your window is the one you specify with the hIcon in the window class.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
So, do I have to setup the Windows .. "stuff"? (I've tried Windows programming, but never done much with it since you had to add all the code at the beginning to set it up.) i.e., What do I need to include (files/code) to be able to change the icon?
(not expecting you to write it for me, if you can hint it or direct me to a tutorial, I'd greatly appreciate it.)
--LiKWiD
Becoming un-noobified one day at a time.
It would help to know what compiler you are using. I'm sure each compiler has it's own way of embedding the icon in the .exe file.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
Whether it's VC++, Borland Builder or Dev-C++, there must be an "add resource" command somewhere. Use it and add an icon resource to the project. Then use some icon editor (all three probably have one built-in) to draw whatever you want.
When you next compile, the icon should be embedded.
It's not as easy for command-line compilers.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I'm using VC++.NET7.
Would you know what the icon editor is named?
"Add Resource" is that the command name?
I do not have my compiler to search, but would help pull the needed details from just typing "Add Resource"?
This sounds like a cool thing to have on my programs.
Good thread.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Project->Add Resource->Icon
adds an icon resource to your app.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
This thread kicks @$$.
I just created my first custom program icon.
Thanks to everyone that participated in this thread.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu