#### Archived

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

# Code Dilemma

This topic is 5916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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 on other sites
try this:

hope this helps...

##### Share on other sites
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 on other sites

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 on other sites

This is the one I use:

  hbm=(HBITMAP) LoadImage(NULL,file_name,IMAGE_BITMAP,0,0, LR_DEFAULTSIZE|LR_LOADFROMFILE);

Guy

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

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