void DIB_DibBltExt(LPPDEVICE lpBitmap, WORD fGet, WORD iStart, WORD cScans, LPSTR lpDIBits, LPBITMAPINFO lpBitmapInfo, LPDRAWMODE lpDrawMode, LPINT lpTranslate, USHORT fPalettized)
Either copies a device-independent bitmap (DIB) to a device-dependent bitmap (DDB) or copies a DDB to a DIB. The fGet parameter specifies which operation to carry out.
Value | Meaning |
Count of scan lines set or retrieved | Function was successful |
0 | An error occurred |
-1 | Bits cannot be set or retrieved |
lpBitmap
Address of a PBITMAP structure specifying a device-dependent memory bitmap.
fGet
Flag specifying whether the function copies DIB bits to DDB bits or copies DDB bits to DIB bits. If this parameter is zero, the function copies the bits from lpDIBits into lpBitmap. If the parameter is 1, the function copies the bits from lpBitmap into lpDIBits.
iStart
The starting scan-line number.
cScans
The number of scan lines to set or retrieve.
lpDIBits
Address of a buffer that contains or receives the bitmap bits. If the fGet parameter is zero, the function copies data from the buffer into the bitmap; if fGet is 1, the function copies the bits to the buffer from the bitmap. If the lpDIBits parameter is NULL, the function fills the biSizeImage member in the BITMAPINFO structure pointed to by the lpBitmapInfo parameter, but does not copy bitmap bits.
lpBitmapInfo
Address of a BITMAPINFO structure specifying the dimensions and format of the device-independent bitmap. If the biPlanes member is not 1 or the biBitCount member is not 1, 4, 8, 16, 24 or 32, the function returns an error.
lpDrawMode
Address of a DRAWMODE structure specifying the text (foreground) and background colors to use if color conversion is required.
lpTranslate
Address of an array of color translation values for converting palette colors to actual device colors. This parameter is ignored by devices that do not use color palettes.
fPalettized
Flag indicating if the display driver is palettized or not. If this parameter is one, the display driver is palettized; if zero, the display driver is not.
The function compares the widths of the device-specific bitmap and the device-independent bitmap. If the widths are not equal, the function clips to the smaller of the two bitmaps.
If the RLE_FORMAT_4 or RLE_FORMAT_8 values are set in the biCompression member of the BITMAPINFO structure, the device-independent bitmap is in run-length-encoded (RLE) format. In this case, the function must encode each scan line as it copies the scan line data to the buffer pointed to by lpDIBits or the function must decode the data as it retrieves it from the buffer.
The export ordinal for this function is 401.