There is a blurb under LoadBitMap that resources greater than 64k have a problem.
If that is so what technique would you use to process a bit map say of 150k?

Posted on 2002-05-08 18:47:22 by shankle
use LoadImage
Posted on 2002-05-08 18:49:47 by smurf
Actually best is to avoid bitmaps if they exceed a certain size... Use Gifs and Png's and Jpg's using Ernies ImageLib or Thomas' PNGLib.

(Look for references on this board)
Posted on 2002-05-08 20:31:15 by JimmyClif
I think the problem is not LoadBitmap, but the exe-load mechanism under Win95. There is a small tool from MS, that corrects your final exe for the alignment of the resource section.

try a search under MS for "FixRes95".
Posted on 2002-05-10 03:42:03 by beaster
After getting the bugs out of my code, I have been able to
create a bit map of size 271,000. I used LoadBitMap and
ran the program on Windows 98 2nd ED.
It seems the the blurb about a max with LoadBitMap is
not correct or I am reading the Docs incorrectly.
Posted on 2002-05-10 09:02:26 by shankle
Or it could be that the warning only applies to versions of the OS prior to Win98 SE :)
Posted on 2002-05-10 09:07:58 by sluggy
From the SDK:

Windows 95: Windows 95 cannot handle executable files that contain resources whose size is 64K or larger. To retain compatibility with 16-bit Windows, it converts the 32-bit size into a 16-bit size and a shift count. When it does this conversion it rounds down instead of up, so some bytes can be lost. The shift required for a large resource can cause a small resource to be severely truncated, or even eliminated completely. To avoid this problem, compute the scaling factor for the largest resource and pad all resources with zeroes so each is a multiple of the scaling factor. For example, a resource of size 0x100065 is converted to 0x8003 * 32, which loses 5 bytes. To save the 5 bytes, you must pad the resource with 27 zeroes so that it becomes size 0x100080 and is then converted to 0x8004 * 32. Note, any smaller resource must also be padded with zeroes so it is a multiple of the scaling factor, which in this case is 32.

Posted on 2002-05-10 22:31:34 by huh