BOOL DrvSetPalette(
IN DHPDEV dhpdev, | |
IN PALOBJ *ppalo, | |
IN FLONG fl, | |
IN ULONG iStart, | |
IN ULONG cColors | |
); |
DrvSetPalette requests that the driver realize the palette for a specified device. The driver sets the hardware palette to match the entries in the given palette as closely as possible.
Parameters
dhpdev
Identifies the device whose palette is to be realized. This parameter is the device handle returned to GDI by DrvEnablePDEV.
ppalo
Points to the PALOBJ from which the colors (RGB values) should be queried.
fl
A set of flags that provides hints and options. This parameter can be the following value:
Value | Meaning |
SP_DEFAULT | The palette is the device’s complete default palette. The PALOBJ can be ignored, but contains the correct contents. |
iStart
Specifies the first palette index to overwrite.
cColors
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 cColor entries and leave the remaining colors as they are.
Return Value
The return value is TRUE if the function is successful. Otherwise, it is FALSE, and an error code is logged.
Comments
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.
See Also