Windows GDI
The SetBitmapBits function sets the bits of color data for a bitmap to the specified values.
Note This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the SetDIBits function.
LONG SetBitmapBits(
HBITMAP hbmp, // handle to bitmap
DWORD cBytes, // number of bytes in bitmap array
CONST VOID *lpBits // array with bitmap bits
);
Parameters
hbmp
[in] Handle to the bitmap to be set. This must be a compatible bitmap (DDB).
cBytes
[in] Specifies the number of bytes pointed to by the lpBits parameter.
lpBits
[in] Pointer to an array of bytes that contain color data for the specified bitmap.
Return Values
If the function succeeds, the return value is the number of bytes used in setting the bitmap bits.
If the function fails, the return value is zero.
Windows NT/2000/XP: To get extended error information, call GetLastError.
Remarks
The array identified by lpBits must be WORD aligned.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
See Also
Bitmaps Overview, Bitmap Functions, GetBitmapBits, SetDIBits