From aldeid
Jump to navigation Jump to search


The CreateCompatibleBitmap function creates a bitmap compatible with the device that is associated with the specified device context.


HBITMAP CreateCompatibleBitmap(
  _In_  HDC hdc,
  _In_  int nWidth,
  _In_  int nHeight


hdc [in]
A handle to a device context.
nWidth [in]
The bitmap width, in pixels.
nHeight [in]
The bitmap height, in pixels.

Return value

If the function succeeds, the return value is a handle to the compatible bitmap (DDB).

If the function fails, the return value is NULL.