WinGGetDIBColorTable

Returns the color table of the WinGBitmap currently selected into a WinGDC.

UINT WinGGetDIBColorTable( HDC hWinGDC, UINT StartIndex, UINT NumberOfEntries, RGBQUAD far *pColors )

Parameters

hWinGDC Identifies the WinG device context whose color table should be retrieved.
StartIndex Indicates the first palette entry to be retrieved.
NumberOfEntries Indicates the number of palette entries to retrieve.
pColors Points to a buffer which receives the requested color table entries.

Return Value

Returns the number of palette entries copied into the given buffer or 0 if it failed.

Comments

The pColors buffer must be at least large enough to hold NumberOfEntries RGBQUAD structures.

Note that StartIndex indicates an entry in a palette array, which is zero-based. NumberOfEntries indicates a one-based count. If NumberOfEntries is zero, no color table entries will be retrieved.

WinGGetDIBColorTable will return 0 for WinGBitmaps with more than 8 bits per pixel.

See Also

WinGSetDIBColorTable WinGCreateBitmap