Group: Bitmap - Library: gdi32
The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.
How to print FoxPro form
Storing screen shot of a form to bitmap file
Storing content of the Clipboard to a bitmap file
How to print a bitmap file
Subclassing CommandButton control to create BackColor property
Vertical Label control
How to convert a bitmap file to monochrome format (1 bpp)
Converting image file to .ICO file
int GetDIBits(
HDC hdc, // handle to DC
HBITMAP hbmp, // handle to bitmap
UINT uStartScan, // first scan line to set
UINT cScanLines, // number of scan lines to copy
LPVOID lpvBits, // array for bitmap bits
LPBITMAPINFO lpbi, // bitmap data buffer
UINT uUsage // RGB or palette index
);
DECLARE INTEGER GetDIBits IN gdi32;
INTEGER hdc,;
INTEGER hbmp,;
INTEGER uStartScan,;
INTEGER cScanLines,;
INTEGER lpvBits,;
STRING @ lpbi,;
INTEGER uUsage
hdc [in] Handle to the device context.
hbmp [in] Handle to the bitmap. This must be a compatible bitmap (DDB).
uStartScan [in] Specifies the first scan line to retrieve.
cScanLines [in] Specifies the number of scan lines to retrieve.
lpvBits [out] Pointer to a buffer to receive the bitmap data.
lpbi [in/out] Pointer to a BITMAPINFO structure that specifies the desired format for the DIB data.
uUsage [in] Specifies the format of the bmiColors member of the BITMAPINFO structure.
If the lpvBits parameter is non-NULL and the function succeeds, the return value is the number of scan lines copied from the bitmap.
DDB = Device-Dependent Bitmap.
DIB = Device-Independent Bitmap: is not a GDI graphic object; cannot be selected into a device context; can be rendered to a device context directly.