# Bitmap Problem.

This topic is 4863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi Everyone, I've been working on my first Graphical Game in C++, it's the ever cliched Tetris Clone, anyway I've gotten all of my code written. Everything compiles and works how it should. However, I do not know how to include a bitmap in Dev C++, so obviously when I run it I get a window with a nice black screen. So if somebody who's familiar with Dev could help me out and tell me how to get a Bitmap to be included in the compile that would be great. I checked all over Bloodshed's site and Googled it but found nothing. Thanks a lot, Godspeed. Jinroh. BTW Sorry if this is the wrong Area to Post it in.

##### Share on other sites
Quote:
 Original post by JinrohHi Everyone,I've been working on my first Graphical Game in C++, it's the ever cliched Tetris Clone, anyway I've gotten all of my code written. Everything compiles and works how it should. However, I do not know how to include a bitmap in Dev C++, so obviously when I run it I get a window with a nice black screen. So if somebody who's familiar with Dev could help me out and tell me how to get a Bitmap to be included in the compile that would be great. I checked all over Bloodshed's site and Googled it but found nothing.Thanks a lot, Godspeed.Jinroh.BTW Sorry if this is the wrong Area to Post it in.

You probably don't want to do that in the end.

Sure, you CAN store it as a resource inside your app, but you might be better served by keeping it as an external file. It's easier to modify artwork if it's not embedded in the executable. You can just edit the image in your favorite editor and re-run, rather than adding an additional compile step.

The GDI's LoadBitmap function can take a file name.

If you really want to add it to the executable, you add a reference to the file in your resource file. I'm not sure how you do it with their IDE, but it should just be adding an entry to the .RES or .RC file.

frob.

##### Share on other sites
Thanks for your input, frob. I really appreciate it, I'm more used to VC++6.0 so I'm spoiled by the Resource Editor. I think that's what threw me off. The lack of a Resource Editor in Dev C++. Anyway, I was going to do the external file route, but decided to have a cleaner, all data compiled approach. I'm not really too concerned with editing the graphics once I have compiled it though. This was more of an experiment with WinAPI in C++, to get me out of the console rut I've been dug into. I did work with BltBit and such in VB6 so I just was curious how it all worked in C++. Thanks again for the input frob, I again, really appreciate it.

Godspeed,
Jinroh.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 12
• 29
• 11
• 44
• ### Forum Statistics

• Total Topics
634856
• Total Posts
3019659
×