## Presentation Device Driver Reference for OS/2

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

### GreQueryRGBColor - Parameters

hdc (HDC) - input Device context handle.

flOptions (ULONG) - input Options flag.

Valid options are:

LCOLOPT_REALIZED If set, the information is required when the logical color table (if any) is realized. When this flag is not set, the information is required when the logical color table is not realized.

LCOLOPT_INDEX When set, the handling routine must return the actual RGB color originally specified for this index. Otherwise, it must return the nearest RGB color for this index, that is, the one which would result from drawing on the specified device.

Other flags are reserved and must be 0.

iColor (LONG) - input Color index.

pInstance (PVOID) - input Pointer to instance data.

lFunction (ULONG) - input High-order WORD=flags; low-order WORD= NGreQueryRGBColor.

rc (LONG) - returns Return Code.

On completion, the handling routine must return the nearest available RGB color to that requested (rgbColor), or GPI_ALTERROR if an error occurred.

Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:

PMERR_DEV_FUNC_NOT_INSTALLED
PMERR_INV_COLOR_DATA
PMERR_INV_COLOR_INDEX
PMERR_INV_COLOR_OPTIONS
PMERR_INV_HDC

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.