SetDIBitsToDevice


WORD SetDIBitsToDevice(LPPDEVICE lpDestDev, WORD X, WORD Y, 
    WORD iScan, WORD cScans, LPRECT lpClipRect, LPDRAWMODE lpDrawMode, 
    LPSTR lpDIBits, LPBITMAPINFO lpBitmapInfo, LPINT lpTranslate);

Copies DIB data directly to the given device. The function converts the bitmap data to the appropriate device-specific format and copies the resulting bits to the device.

lpDestDev

Address of a PDEVICE structure that specifies the device to receive the DIB.

X and Y

Coordinates, in device units, to receive the top left corner of the DIB.

iScan

Starting scan line.

cScans

Number of scan lines to copy.

lpClipRect

Address of a RECT structure that specifies the clip rectangle.

lpDrawMode

Address of a DRAWMODE structure that specifies the background mode and background color to use while copying the bitmap.

lpDIBits

Address of a buffer that contains the DIB bits.

lpBitmapInfo

Address of a BITMAPINFO structure that specifies the dimensions and format of the DIB.

If the RLE_FORMAT_4 or RLE_FORMAT_8 values are set in the biCompression member of the BITMAPINFO structure, the bitmap is in run-length-encoded (RLE) format. In this case, the function must decode the data as it retrieves it from the buffer pointed to by the lpDIBits parameter.

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.

The export ordinal for this function is 21.

GDI calls this function whenever an application calls the SetDIBitsToDevice function (GDI.443).

A graphics device driver must export the SetDIBitsToDevice function if the RC_DIBTODEV value is set in the dpRaster member of the driver's GDIINFO structure.

The function removes the cursor before copying the bitmap bits to the display device and restores the cursor after copying.

See also PDEVICE, RECT, DRAWMODE, BITMAPINFO