HBITMAP EngCreateBitmap(
IN SIZEL sizl, | |
IN LONG lWidth, | |
IN ULONG iFormat, | |
IN FLONG fl, | |
IN PVOID pvBits | |
); |
EngCreateBitmap requests that GDI create and manage a bitmap. Storage for the bitmap can optionally be provided by the driver.
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. |
Value |
Meaning |
BMF_TOPDOWN |
The first scan line represents the top of the bitmap. Note that standard-format bitmaps have the first scan line at the bottom by default. |
BMF_NOZEROINIT |
GDI will not zero-initialize the bitmap when allocating it. This flag is checked only when pvBits is null. |
BMF_USERMEM |
GDI will allocate the memory for the bitmap from user memory. By default, the memory is allocated from the kernel’s address space. This flag should be specified only when the bitmap being created will not be used by other processes. User memory cannot be passed to EngWritePrinter by the printer driver. |
If the function completes successfully, the return value is a handle that identifies the created bitmap. Otherwise, it is zero, and an error code is logged.
The driver should associate the created bitmap as a surface by calling EngAssociateSurface before returning from DrvEnableSurface.
The bitmap should be deleted by using EngDeleteSurface when it is no longer needed.
Frame buffer display drivers should use the pvBits parameter, allowing GDI to do most drawing directly to the display.