Skip to main content
gamedev.net
🔒 Locked

Icons

Started by capn_midnight Oct 11, 2000 at 2:27 PM 4 replies 500+ views
Original Post
capn_midnight
capn_midnight
How do you make icons for a program? a friend of mine told me all you had to do was include it with the project, but I can''t figure out how or where? Would I use a bmp? Then, how would I associate it with my program? shut up CAN I GET A WOO WOO!
DJ_House
DJ_House
Hopefully you''re using VC++ 6.0... In your project go to
File->New, then choose resource script, type "resource" in the filename box. In your main file (.cpp) type this line:

#include "resource.h"

Now, in your resource file (located under the resource tab), right click and go to Insert->Icon. Draw your icon (you can even pick different modes in the icon editor). Right click on the resource.rc file and click ''compile''. Once again in your mail file (.cpp), change the WNDLCLASS.hIcon line to... (note, I''m using WNDCLASS as the struct, use whatever your variable name for it is)

WNDCLASS.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WHATEVER_NAME_YOU_GAVE_IT);

That''s it. Hopefully I didn''t confuse you too much.
capn_midnight
capn_midnight
I think maybe I should totally ignore your post becuase I''m running Borland C++ 4.52 instead of VC++6. :D


Bowowow yipeeyo yipeeyay
capn_midnight
capn_midnight
after I did that, I couldn''t figure out how to use the .ico file. Oh well, I guess I can just forget about it. Not that important.
crazy-vasey
crazy-vasey
In the C++ Builder its under project->Options->Application but you can add them to resource files like in previous post. Check out http://bcgrizzly.com/~forger/winprog/tutorial/ for how to edit borland rc files.

My Homepage

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.