This function requests that the driver realize the palette for a specified device.

BOOL DrvSetPalette(
  DHPDEV dhpdev,
  PALOBJ* ppalo,
  FLONG fl,
  ULONG iStart,
  ULONG cColors


  • dhpdev
    [in] Device whose palette is to be realized. This parameter is the device handle returned to GDI by DrvEnablePDEV.
  • ppalo
    [in] Pointer to the PALOBJ from which the colors, RGB values, should be queried.
  • fl
    [in] Flags that provide customizations. Optionally set to SP_DEFAULT to specify that the palette is the device's complete default palette, and the PALOBJ can be ignored, but contains the correct contents.
  • iStart
    [in] First palette index to overwrite.
  • cColors
    [in] Number of colors to change in the hardware palette. You ignore colors beyond the number available in the hardware. If cColors is smaller than the size of the hardware palette, set only cColor entries and leave the remaining colors as they are.

Return Values

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.


OS Versions: Windows CE 1.0 and later.
Header: Winddi.h.
Link Library: Ddi_ati_lib.lib, Ddi_flat_lib.lib, Ddi_gx_lib.lib, Ddi_mq200_lib.lib, Ddi_nop_lib.lib, Ddi_perm3_lib.lib, Ddi_rflat_lib.lib, Ddi_rgx_lib.lib, or Ddi_tvia5_lib.lib.

See Also

Display Drivers | DrvEnablePDEV

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.