Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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(
  _In_       HBITMAP hbmp,
  _In_       DWORD   cBytes,
  _In_ const VOID    *lpBits
);

Parameters

hbmp [in]

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

cBytes [in]

The number of bytes pointed to by the lpBits parameter.

lpBits [in]

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Bitmaps Overview
Bitmap Functions
GetBitmapBits
SetDIBits

 

 

Community Additions

ADD
Show:
© 2015 Microsoft