Jump to content
  • Advertisement
Sign in to follow this  
Jinroh

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.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!