## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreDeviceResizePalette - Syntax

Simulation support:

This function is simulated by a handling routine in Revision 2.0 (or higher ) of the graphics engine.

Description

GreDeviceResizePalette changes the size of a logical palette. If the size is reduced, the removed entries are deleted. If the size is increased, the new entries are set to Black.

This function can be hooked by the presentation driver.

    #define INCL_GRE_PALETTE

    #include <os2.h>

    HDC      hdc;        /*  Device context handle. */

    ULONG    hdevpal;    /*  Device palette handle. */

    ULONG    ulSize;     /*  New palette size. */

    PVOID    pInstance;  /*  Pointer to instance data. */

    ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreDeviceResizePalette. */

    LONG     rc;         /*  Return codes. */

    rc = GreDeviceResizePalette(hdc, hdevpal,

           ulSize, pInstance, lFunction);