Compartilhar via


DrvCreateDeviceBitmap (Compact 2013)

3/26/2014

This function creates and manages bitmap files.

Syntax

HBITMAP DrvCreateDeviceBitmap(
  DHPDEV dhpdev,
  SIZEL sizl,
  ULONG iFormat
);

Parameters

  • dhpdev
    [in] 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
    [in] SIZEL structure that contains the width and height of the bitmap to be created. The cx and cy members of this structure contain respectively, the bitmap's width and height, in pixels. A SIZEL structure is identical to a SIZE structure.
  • iFormat
    [in] Bitmap format, which indicates the required number of bits of color information per pixel, and always matches the format of the primary. The following table shows the possible values. Set to one of these values.

    Value

    Description

    BMF_8BPP

    8 bits per pixel.

    BMF_16BPP

    16 bits per pixel.

    BMF_24BPP

    24 bits per pixel.

    BMF_32BPP

    32 bits per pixel.

Return Value

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.

Remarks

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.

The contents of the created bitmap are undefined.

Requirements

Header

winddi.h

Library

Ddi_ati_lib.lib,
Ddi_flat_lib.lib,
Ddi_gx_lib.lib,
Ddi_mq200_lib.lib,
Ddi_nop_lib.lib,
Ddi_rflat_lib.lib,
Ddi_rgx_lib.lib,
Ddi_tvia5_lib.lib

See Also

Reference

Display Driver Functions
DrvDeleteDeviceBitmap

Other Resources

SIZE