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

U16Value
0coloruse
1lines
2starting line
3ySrc
4xSrc
5cy
6cx
7yDst
8xDst
9 to endthe 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