次の方法で共有


DrvSetPalette (Compact 2013)

3/26/2014

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

Syntax

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

Parameters

  • 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 Value

TRUE if the function is successful. Otherwise, it is FALSE, and an error code is logged.

Remarks

The driver sets the hardware palette to match the entries in the given palette as closely as possible.

Requirements

Header

winddi.h

Library

Ddi_ati_lib.lib,
Ddi_flat_lib.lib,
Ddi_gx_lib.lib,
Ddi_mq200_lib.lib,
Ddi_nop_lib.lib,
Ddi_rflat_lib.lib,
Ddi_rgx_lib.lib,
Ddi_tvia5_lib.lib

See Also

Reference

Display Driver Functions
DrvEnablePDEV