The DrvSetPalette function requests that the driver realize the palette for a specified device.
BOOL DrvSetPalette( DHPDEV dhpdev, PALOBJ *ppalo, FLONG fl, __range iStart, __range cColors );
Pointer to the PALOBJ structure from which the colors (RGB values) should be queried.
A set of flags that provides hints and options. This parameter can be the following value:
The palette is the device's complete default palette. The PALOBJ can be ignored, but contains the correct contents.
Specifies the first palette index to overwrite.
Specifies the number of colors to change in the hardware palette. Extra colors, beyond the number available in the hardware, can be ignored. If cColors is smaller than the size of the hardware palette, set only cColors entries and leave the remaining colors as they are.
The return value is TRUE if the function is successful. Otherwise, it is FALSE, and an error code is logged.
The driver sets the hardware palette to match the entries in the given palette as closely as possible.
Only indexed palettes are realizeable. The RC_PALETTE bit of the flRasterCaps member of the GDIINFO structure specifies whether a device has a realizeable palette.
DrvSetPalette is required for display drivers that support realizeable palettes.