In OS/2, the bitmap width and height are bounded by screen resolution. For example, for a screen resolution of 1024 x 768, the bitmap:

The plane count usually does not work if greater than 1 because of the restriction of the physical device. OS/2 supports a bits-per-pel count of:

Any other value fails.

Note: Testing of the Windows 32-bit CreateBitMap function shows that if CreateBitmap is called to get a handle of a one-plane device-dependent bitmap, and the third parameter (cPlanes) is greater than one, a handle is returned as if CreateBimap was successful. However, a subsequent call to BitBlt or PatBlt reveals that this handle is not valid, because even though no error is returned, no bitmap appears. The OS/2 implementation of CreateBitmap fails in this case (that is, if the plane count is greater than one). In other words, the return value from our implementation of CreateBitmap is NULL. This is because the underlying call to GpiCreateBitmap returns an error in this case.


[Back] [Next]