DrvCreateDeviceBitmap

HBITMAP DrvCreateDeviceBitmap(

    IN DHPDEV dhpdev,

    IN SIZEL sizl,

    IN ULONG iFormat

   );

DrvCreateDeviceBitmap creates and manages bitmaps.

Parameters

dhpdev
Identifies the PDEV that describes the physical device that an application has designated as the primary target for a bitmap. The format of the bitmap must be compatible with this physical device.
sizl
Specifies the height and width of the desired bitmap, in pixels.
iFormat
Specifies the bitmap format, which indicates the required number of bits of color information per pixel. This value can be one of the following:

Value

Meaning

BMF_1BPP

Monochrome.

BMF_4BPP

4 bits per pixel.

BMF_8BPP

8 bits per pixel.

BMF_16BPP

16 bits per pixel.

BMF_24BPP

24 bits per pixel.

BMF_32BPP

32 bits per pixel.

BMF_4RLE

4 bits per pixel; run length encoded.

BMF_8RLE

8 bits per pixel; run length encoded.

Return Value

The return value is a handle that identifies the created bitmap if the function is successful. If the driver chooses to let GDI create and manage the bitmap, the return value is zero. If an error occurs, the return value is 0xFFFFFFFF, and GDI logs an error code.

Comments

If the driver creates the bitmap, it can store it anywhere and in any format. It is assumed that the driver will take into account the specifications of the parameters and provide a bitmap with at least as many bits per pixel as requested.

It is neither required nor recommended that drivers manage bitmaps. This capability is provided for devices such as the VGA adapter card that are able to perform bit-block transfers (DrvBitBlt) faster using nonstandard-format bitmaps.

The contents of the created bitmap are undefined. If an application requests initialization of the bitmap, GDI calls DrvBitBlt. If the display driver returns zero, GDI creates and manages the bitmap.

This function is optional.

See Also

DrvDeleteDeviceBitmap