# NAME

META_SETDIBTODEV

# NEAREST API CALL

    #include <windows.h>
    INT32 SetDIBitsToDevice
    (
    	HDC32 hdc,
    	INT32 xDest,
    	INT32 yDest,
    	DWORD cx,
    	DWORD cy,
    	INT32 xSrc,
    	INT32 ySrc,
    	UINT32 startscan,
    	UINT32 lines,
    	LPCVOID bits,
    	const BITMAPINFO *info,
    	UINT32 coloruse
    );

# DESCRIPTION

U16 | Value
0 | coloruse
1 | lines
2 | starting line
3 | ySrc
4 | xSrc
5 | cy
6 | cx
7 | yDst
8 | xDst
9 to end | the dib itself

coloruse is one of either DIB_RGB_COLORS or DIB_PAL_COLORS
lines is the number of lines in the dib to copy, in fact only this number of lines *exist* in the dib attached to the record, the header of the dib may tell you that there's more lines in the dib that there actually is, so you must use this value to determine the truth (nasty eh!)
starting line is the line of the original dib that was to be the starting line to copy from, in the metafile record you can ignore this, as the attached dib is cropped as far as this line, so this work is done for you
xSrc, and ySrc are the location in the dib to copy from, im uncertain of these for the moment, as all examples have them to set to 0
cy and cx are the size of the destination rectangle, with xDest and yDest being the coordinate of the topleft of the dest rect.
the rest of the bytes are the dib itself, but remember the height of the dib, as shown in its header may be wrong, use the lines parameter to determine the truth

back