Click to See Complete Forum and Search --> : LoadImage Fails in Windows 95


Fandu_Nagesh
March 30th, 2004, 09:06 AM
hBMP = (HBITMAP) LoadImage(NULL, (LPCTSTR)"C:\WBITMAP.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);


Above LoadImage fails in Windows 95. But the same executes properly in Windows 2000.
What may be the reason?
The image details are as follows:
1. WBITMAP.bmp - 32 MB of Image.
2. 24 Bit True Color.

I tried to get the result from GetLastError() But it returns Zero.

What is the reason to fail this function.?
Regards
Nagesh

Paul McKenzie
March 30th, 2004, 09:33 AM
"C:\WBITMAP.bmp"Unless this is a typo, the string-literals that contain file names must have two backslashes OR one single forward slash for the directory separator.

Regards,

Paul McKenzie

Fandu_Nagesh
March 30th, 2004, 11:35 AM
Hi Paul,
Yeah ...Its typo error...Sorry for creating confusion.

Thanks
Regards
Nagesh

Fandu_Nagesh
March 30th, 2004, 11:21 PM
The following statements fails to load the image.

hBMP = (HBITMAP) LoadImage(NULL, (LPCTSTR)"C:\\WBITMAP.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);


Does windows 95 have any image File size constraints?.

Can we load the JPEG images with Win API?

Regards
Nagesh