Coding in an exe icon
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.
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!
Hope I helped
Cheers!
I think you can specify what icon you want for your program when initializing your winclass.
I suggest checking MSDN for info.
I suggest checking MSDN for info.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement