Simulation support:
None. This function is mandatory for all drivers.
Description:
GreGetBitmapBits can be called for two reasons. If the pointer to application storage (pBitmap) is not NULL, the function transfers bit-map data from a bit map to application storage. If pBitmap is NULL, this function must only fill in the RGB values in the BITMAPINFO or BITMAPINFO2 data structure, which is pointed to by pInfo, and then return the value 0.
This function must be supported by the presentation driver. GreGetBitmapBits is called from GpiQueryBitmapBits, and is used to transfer bit-map data from the device context to application storage. It can be handled by bit-map simulation.
#define INCL_GRE_BITMAPS #include <os2.h> HDC hdc; /* Device context handle. */ HBITMAP hbm; /* Bit-map handle. */ LONG lScanStart; /* Scan line number from where data transfer starts. */ LONG cScanCount; /* Number of scan lines to be transferred. */ PBYTE pBitmap; /* Pointer to bit-map data or NULL. */ PBITMAPINFO pInfo; /* Pointer to BITMAPINFO or BITMAPINFO2 structure. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreGetBitmapBits. */ LONG rc; /* Return Code. */ rc = GreGetBitmapBits(hdc, hbm, lScanStart, cScanCount, pBitmap, pInfo, pInstance, lFunction);