SetBitmapBits function

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.
 

Syntax

LONG SetBitmapBits(
  HBITMAP    hbm,
  DWORD      cb,
  CONST VOID *pvBits
);

Parameters

hbm

A handle to the bitmap to be set. This must be a compatible bitmap (DDB).

cb

The number of bytes pointed to by the lpBits parameter.

pvBits

A pointer to an array of bytes that contain color data for the specified bitmap.

Return Value

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.

Remarks

The array identified by lpBits must be WORD aligned.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See Also

Bitmap Functions

Bitmaps Overview

GetBitmapBits

SetDIBits