CreateDeviceDependentBitmap


static Handle CreateDeviceDependentBitmap(Handle Device,
                                          BitmapInformation^ Header,
                                          unsigned Initialize,
                                          Handle Data,
                                          Handle Information,
                                          unsigned Usage)

This function creates a device dependent bitmap from a device independent bitmap.

Parameters

Handle Device

The handle of a device context with which the bitmap is to be compatible.

BitmapInformation^ Header

If the next parameter (Initialize) is set to BitmapOperation::Initialize, the bitmap dimensions etc. specified within this structure are used to define the characteristics of the bitmap being created; otherwise, this parameter is not used. If a positive height is specified within the bitmap information structure the bitmap is a bottom-up device independent bitmap; otherwise, if a negative value is specified, the bitmap is a top-down device independent bitmap.

unsigned Initialize

If BitmapOperation::Initialize is specified for this parameter, the bitmap data pointed to by the next parameter is used to initialize the bitmap being created; otherwise, the bitmap remains uninitialized.

Handle Data

A pointer to the bitmap data used to initialize the bitmap.

Handle Information

A pointer to a bitmap information structure describing the bitmap data provided by the previous parameter. This parameter is used only if the parameter initialize is set to BitmapOperation::Initialize.

unsigned Usage

The format of the color table in the bitmap information object. Valid values are:

Colors::RedGreenBlue The associated color table contains red, green, blue values.
Colors::Palette The associated color table consists of 16 bit indices into the currently realized logical color palette.

Return

Handle

The handle of the bitmap or null if an error occurred.

Notes

The function SelectObject may be used to select the bitmap into a device context.

The function DeleteObject may be used to destroy the bitmap.

Details

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