Skip to main content
gamedev.net
🔒 Locked

Bitmap Problem.

Started by Jinroh Dec 1, 2005 at 10:01 AM 1 replies 650+ views
Original Post
Jinroh
Jinroh
Hi Everyone, I've been working on my first Graphical Game in C++, it's the ever clich`ed 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.
The wolf and his mate howl, taking solace in the silver moon. Pressing ever foreward to see what the future holds.
frob
frob
Quote:
Original post by Jinroh
Hi Everyone,

I've been working on my first Graphical Game in C++, it's the ever clich`ed 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.
Jinroh
Jinroh
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.
The wolf and his mate howl, taking solace in the silver moon. Pressing ever foreward to see what the future holds.

Topic Locked

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

Sign in to reply to this topic.