How do I add graphics to my resource files? I know it varies from compiler to compiler, but just tell me how it's done with the compiler you use. (And make sure you tell me which compiler you're talking about when you do)
Thanks
How do I add graphics to my resource files? I know it varies from compiler to compiler, but just tell me how it's done with the compiler you use. (And make sure you tell me which compiler you're talking about when you do)
Thanks
-Dean
Here is how it is done in BC++B:
code (game.rc):
//------------------------------------------------------------------------------
INTRO BITMAP .\\GrafX\\Intro\\smile.bmp
MENU BITMAP .\\GrafX\\Menu\\menu.bmp
ARROW BITMAP .\\arrowtt.bmp
MAZE BITMAP .\\maze.bmp
UNITS BITMAP .\\units.bmp
//it's the first word (INTRO, MENU, etc.) you will use to recall the graphics in your code
//------------------------------------------------------------------------------
In Bloodshed Dev-C++ 4.0, Click on the [Project] tab in the menu bar at the top of the screen, then click [Edit resource file]. From there, you can manually ad a resource by naming the resource handle (default is MyResource1,2,3,4,...), then typing [BITMAP "wherever the bitmap is on your drive"].
Or, you can add a bitmap resource by utilizing the built-in wizard - click on the "Insert Bitmap Resource" button (hover you mouse over the options) and browse for your bitmap on your hard drive/removable media/etc and give it a resource ID. Hit OK, then you should be done
Linux is great - It does infinite loops in five seconds!
~Linus Torvalds
In Micro$oft's Visual C++.NET, under your solution explorer, add a resource file if you haven't done so already, then right-click on the resource file and hit "Open". You should now see the resource viewer. Right-click again on the resource file and hit "Add Resource". You will be brought to a menu where you can choose the type of resource you want to add. Click on "Bitmap", then hit the "Import" button on the right. Choose your Bitmap, then you're done!
Linux is great - It does infinite loops in five seconds!
~Linus Torvalds