Program icon???

Started by
5 comments, last by Noods 20 years, 8 months ago
Lets say I have an icon file "icon1.ico". How do I make this the icon for a program in MSV C++? Does this have to be specified in the project or can I do it strictly in the code?
Advertisement
You can simply add it to your resources and windows will automatically use it.
---Yesterday is history, tomorrow is a mystery, today is a gift and that's why it's called the present.
Tried that and it didnt work. Maybe Im doing it wrong?
Do you load the icon with your window class?

wndclass.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(ICON_1));




[edited by - stooge_dev on August 16, 2003 5:22:31 PM]
Dev-C++ will do it for you...just go into the Project Options and select an icon.
Visit the 3DHangout
Noods:

The part stooge_dev forgot to tell you was that you have to set ICON_1


Set which icon to use like the following:

ICON_1 ICON DISCARDABLE "MyGame.ico"

then do

wndclass.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(ICON_1));
Mike Cunningham (First year student)
You have to put the ICON_1 in something like a resource.h file

This topic is closed to new replies.

Advertisement