Advertisement

BitMap loading prob

Started by February 14, 2000 04:47 AM
2 comments, last by Jester 25 years ago
Ok this is a long and painful story so bear w/me I have an image class that has a load_bmp method In my program I create to instances of this class and then I load bmps into them. I can BltFast them to the back buffer but only the first one worx I Blit them to two different places on the Back Buffer surface and then I flip it. The actual BltFast methods work without a catch but once I have loaded that first bmp that''s all I can blit regaurdless if I specify another bmp to load that (*&^ing surface stays in memory some how ( i think ). Even though I change the string and recompile it still seems to load the initial bmp. What is up with this? Do I need to make static vars in my class? becuase of the two intances? HELP PLEASE! Where is your faith now?
Where is your faith now?
Your explaination is a little confusing. Are you saying you load a bitmap into your surface.( lets call the bitmap "Mybitmap.bmp" and the surface lpddsoffscreen )
So now your surface contains the bitmap "Mybitmap.bmp".
But if you recompile to load a bitmap named "Otherbmp.bmp" into this same surface it''s still showing the "Mybitmap.bmp" image?

If that isn''t what you meant, sorry.

Still Learning...
Still Learning...
Advertisement
Yes that''s exactly what I meant. I fixed it last night though. I am not sure exactly what I was doing wrong but in my load_bmp method I was useing the DeleteObject on the HDC of that I got from my IDirectDrawSurface7 mothod instead of on the Image HDC, So I wasn''t deleting the correct object. I haven''t been working alot with device contexts and I practicaly copied my load_bmp method verbatim from the ddutil.cpp thing frum DX.
Where is your faith now?
Great! Glad you got it working. You learn something new everytime you sit down and type some code! Keep it up

Still Learning...
Still Learning...

This topic is closed to new replies.

Advertisement