Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Problem with loading bitmaps into DirectDraw

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

I use the code from article 1064(http://www.gamedev.net/reference/articles/article1064.asp) I replaced the line: hBitmap = LoadImage(NULL, fname, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); by hBitmap = (HBITMAP) LoadImage(NULL, fname, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); I loaded the image into the surface with: CreateBitmapSurface(global_bitmaps.menu, "menu.bmp", 1024, 113); // Loading menu The menu.bmp is in the right directory. I tried to show show the bitmap with: RECT destrect; RECT sourcerect; DDBLTFX blitfx; DD_INIT_STRUCT(blitfx); destrect.top = 0; destrect.left = 0; destrect.bottom = 113; destrect.right = 1024; sourcerect = destrect; lpddsback->Blt(&destrect, global_bitmaps.menu,&sourcerect,NULL,&blitfx) "lpddsback" is my back surface. and BITMAPARRAY global_bitmaps is for the moment defined as: typedef struct BITMAPARRAY_TYP { LPDIRECTDRAWSURFACE7 menu; } BITMAPARRAY, *BITMAPARRAY_PTR; He shows nothing, when i start the program, while showing polygons or rectangles with lamothe''s functions is no problem thanks in advance draggy

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!