Simulation support:
None. This function is mandatory for all drivers.
Description:
GreQueryRGBColor returns the actual RGB color that results from the specified color index for the specified device. If the color index is RGB mode, the nearest RGB color (the same as QueryNearestColor) is returned.
This function must be supported by the presentation driver. GreQueryRGBColor is called by GpiQueryRGBColor in response to the request of an application to convert a color index into the corresponding RGB value. If the logical table is currently in RGB mode, the nearest RGB color is returned. This function can be handled by bit-map simulation.
#define INCL_GRE_COLORTABLE #include <os2.h> HDC hdc; /* Device context handle. */ ULONG flOptions; /* Options flag. */ LONG iColor; /* Color index. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreQueryRGBColor. */ LONG rc; /* Return Code. */ rc = GreQueryRGBColor(hdc, flOptions, iColor, pInstance, lFunction);