## Presentation Device Driver Reference for OS/2

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

### GreQueryColorData - Syntax

Simulation support:

None. This function is mandatory for all drivers.

Description:

GreQueryColorData stores an array of information about the currently available logical color table and device colors at the location addressed by pArray.

This function must be supported by the presentation driver. GreQueryColorData is called by GpiQueryColorData in response to an application's request for the currently selected color table data for the device context. This function can be handled by bit-map simulation.

    #define INCL_GRE_COLORTABLE

    #include <os2.h>

    HDC      hdc;        /*  Device context handle. */

    LONG     cArray;     /*  Number of elements supplied in Array. */

    PLONG    pArray;     /*  Pointer to Array. */

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

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

    BOOL     rc;         /*  Return Code. */

    rc = GreQueryColorData(hdc, cArray, pArray,

           pInstance, lFunction);