Jump to content

GreDeviceResizePalette

From EDM2

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.

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

Syntax

GreDeviceResizePalette(hdc, hdevpal, ulSize, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
hdevpal (ULONG) - input
Device palette handle.
ulSize (ULONG) - input
New palette size.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreDeviceResizePalette.

Returns

rc (LONG) - returns
Return codes.
On completion, this function returns the following values:
  • Error (0)
  • Successful (1)

Sample

#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);