GetBitmapBits function

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

Note  This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the GetDIBits function.
 

Syntax

LONG GetBitmapBits(
  HBITMAP hbit,
  LONG    cb,
  LPVOID  lpvBits
);

Parameters

hbit

A handle to the device-dependent bitmap.

cb

The number of bytes to copy from the bitmap into the buffer.

lpvBits

A pointer to a buffer to receive the bitmap bits. The bits are stored as an array of byte values.

Return Value

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.

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