Archived

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

JSCFaith

Code Dilemma

Recommended Posts

JSCFaith    122
Well, I basically just finished my game, but now I have a little annoying problem. For example, when I load an image using the code below works fine on my Win2000 and WinXP machines.
        

    // Try loading the image.

    hbm = ( HBITMAP )LoadImage( NULL, szImage, 
       IMAGE_BITMAP, ddsd.dwWidth, 
       ddsd.dwHeight, LR_LOADFROMFILE |
       LR_CREATEDIBSECTION );

        
Now, when I try it on a machine running ME,98,95, it doesnt work. hbm = NULL; I can't figure out why. Well, my machines running those have old graphics cards. One has a 4mb card and the other has a 4mb card and a 12mb Voodoo 2. Could that be the problem? Well, I can't seem to figure out whats going on. If you could help I would appreciate it. Thanks. Later BTW, I meant dilemma, not delema. Later Edited by - JSCFaith on November 10, 2001 7:15:15 PM Edited by - JSCFaith on November 10, 2001 7:16:08 PM

Share this post


Link to post
Share on other sites
JSCFaith    122
Well, that didn''t seem to fix it. I just put a test version of my game up to see if it happens to anyone else. It doesn''t crash, it just leaves the game. Well, maybe it has to do with the hardware. I will see. Thanks for the help though

Later.

Share this post


Link to post
Share on other sites
Gladiator    127
hbm = (HBITMAP)LoadImage(NULL, szImage, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);

The code above works fine for loading a bitmap on my system (win98) but your game doesn''t seem to be working there...

So i''m guessing there''s something with your image filename that''s not the correct one... check it out

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
What did GetLastError() say? Note: checking the error message is *a lot* more effective than trial & terror;-)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
What did GetLastError() say? Note: checking the error message is *a lot* more effective than trial & terror;-)

Share this post


Link to post
Share on other sites