Jump to content
  • Advertisement


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


Problem with loading bitmaps into DirectDraw

This topic is 6680 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.

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!