Jump to content
  • Advertisement
Sign in to follow this  

SDL_image with MFC...?

This topic is 5469 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

Hello! I've been working on a small project that requires all sorts of image formats to be loaded and stored in a CBitmap class.. But I'm having problems linking an SDL Surface with MFC's CreateBitmap function. Here's the code that I have so far for loading the image..
	SDL_Surface *surface = IMG_Load("goose.bmp");

	HBITMAP bitmap = CreateBitmap(surface->w, surface->h, 3, 24, surface->pixels);

I'm just trying to get it to work, but the screen comes up blank. I used the LoadImage function to load the same bmp and display it, and it works. But I need to be able to load the other formats, so that won't cut it.. I'd really appreciate it if someone could help me out, I'm getting frustrated with this.. :( -Fredric

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!