CreateBitmap


static Handle CreateBitmap(int Width,
                           int Height,
                           unsigned Planes,
                           unsigned Bits,
                           Handle Data)

This function creates a bitmap of the given dimensions, color planes and bits/pixel.

Parameters

int Width

The width (in pixels) of the bitmap. If zero is specified, a bitmap of dimensions 1x1 pixel is created.

int Height

The height (in pixels) of the bitmap. If zero is specified, a bitmap of dimensions 1x1 pixel is created.

unsigned Planes

The number of color planes supported by the device.

unsigned Bits

The number of bits used to represent a single pixel.

Handle Data

A pointer to the bitmap's color data. If this parameter is zero, the bitmap is created in an uninitialized state.

Return

Handle

The handle of the bitmap.

Notes

For performance reasons, this function should only be used to create monochromatic bitmaps. Color bitmaps should be created through CreateBitmap - Compatible (which takes the device context color format into account).

The function DeleteObject may be used to destroy the bitmap when it is no longer required.

Details

Name Space IPlusPlus::Graphics
Class Gdi
Assembly IPlusPlus.WinPlus.dll