GetBitmapBits

The GetBitmapBits function copies the bitmap bits of a specified bitmap into a buffer.

Note  The GetBitmapBits function is obsolete. This function is provided for compatibility with 16-bit versions of Windows. Win32-based applications should use the GetDIBits function.

LONG GetBitmapBits(
  HBITMAP hbmp,      // handle to bitmap
  LONG cbBuffer,     // number of bytes to copy
  LPVOID lpvBits     // pointer to buffer to receive bits
);
 

Parameters

hbmp
Handle to the bitmap of interest.
cbBuffer
Specifies the number of bytes to copy from the bitmap into the buffer.
lpvBits
Pointer to a buffer to receive the bitmap bits. The bits are stored as an array of byte values.

Return Values

If the function succeeds, the return value is the number of bytes copied to the buffer.

If the function fails, the return value is zero.

Windows NT: To get extended error information, call GetLastError.

See Also

Bitmaps Overview, Bitmap Functions