SetBitmapBits

  LONG SetBitmapBits(hbmp, cBytes, lpBits)    
  HBITMAP hbmp; /* handle of bitmap */
  DWORD cBytes; /* number of bytes in bitmap array */
  CONST BYTE *lpBits; /* address of array with bitmap bits */

The SetBitmapBits function sets the bits of color-data for the given bitmap to the specified values.

This function is included only for compatibility with earlier versions of Windows. New Win32 applications should use the SetDIBits function.

Parameters

hbmp

Identifies the bitmap to be set.

cBytes

Specifies the number of bytes pointed to by the lpBits parameter.

lpBits

Points to an array of bytes that contain color data for the given bitmap.

Return Value

The return value is the number of bytes used in setting the bitmap bits, if the function is successful. Otherwise, the return value is zero.

See Also

GetBitmapBits SetDIBits