HPALETTE EngCreatePalette(
IN ULONG iMode, | |
IN ULONG cColors, | |
IN PULONG *pulColors, | |
IN FLONG flRed, | |
IN FLONG flGreen, | |
IN FLONG flBlue | |
); |
EngCreatePalette sends a request to GDI to create a palette. The driver associates the new palette with a device by returning a pointer to the palette in the DEVINFO structure.
Value |
Meaning |
PAL_INDEXED |
An array of RGB colors is provided with cColors and pulColors. |
PAL_BITFIELDS |
The palette is defined by the flRed, flGreen, and flBlue parameters. |
PAL_RGB |
The device accepts RGB colors directly, with R as the least significant byte. |
PAL_BGR |
The device accepts RGB colors directly, with B as the least significant byte. |
The return value is a handle to the new palette if the function is successful. Otherwise, it is zero, and an error code is logged.