Graphics, Resource Files

This is a discussion on Graphics, Resource Files within the C++ Programming forums, part of the General Programming Boards category; How do I add graphics to my resource files? I know it varies from compiler to compiler, but just tell ...

Graphics, Resource Files

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)

*.rc

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

*.rc (2)

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!