GETCOLORTABLE

short Escape(hdc, GETCOLORTABLE, sizeof(int),lpIndex,lpColor)

The GETCOLORTABLE printer escape retrieves an RGB color-table entry and copies it to the location specified by the lpColor parameter.

Parameters

hdc

HDC Identifies the device context.

lpIndex

LPINT Points to a short integer that specifies the index of a color-table entry. Color-table indexes start at zero for the first table entry.

lpColor

LPDWORD Points to the long integer that will receive the RGB color value for the given entry.

Return Value

The return value specifies the outcome of the escape. This value is positive if the escape is successful. Otherwise, it is negative.