Coding in an exe icon

Started by
3 comments, last by clearz 18 years, 9 months ago
Hi I am using MS VC++ Express 2005 Beta 2 to learn to program Direct3D. This is fine only that it dosent allow you to use the Resource Editor. I am just finnishing up my first game and want to add an icon to the exe instead of that ugly default window icon. Is there a way to manually code in an icon using a .ico file or do I need to use the resource editor. Thanks.
Advertisement
Hmm...for C++ I use dev-cpp and you dont have to code in a icon. You just add it in project properties or something. Check the help file! :)

Hope I helped

Cheers!
Belive it or not...this is C++....
I think you can specify what icon you want for your program when initializing your winclass.

I suggest checking MSDN for info.
-----------------------------Play Stompy's Revenge! Now!
Code the following in your resource file:
IDI_PRGM ICON DISCARDABLE "icon.ico"

The name "icon.ico" is the name of the icon file you wish to compile into your program.

Code this for the member icon within your windows attributes strucuture:
wc.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PRGM));

This will find and utilize the icon when your program runs.

Make sure to create a #define numeric value for it.
Xiachunyi, thanks very much I got that to work.

This topic is closed to new replies.

Advertisement