UINT GetSystemPaletteEntries(hdc, iStartIndex, nEntries, lppe) | |||||
HDC hdc; | /* handle of device context | */ | |||
UINT iStartIndex; | /* index of first entry to be retrieved | */ | |||
UINT nEntries; | /* number of entries to be retrieved | */ | |||
LPPALETTEENTRY lppe; | /* array receiving system-palette entries | */ |
The GetSystemPaletteEntries function retrieves a range of palette entries from the system-palette that is associated with the given device context.
hdc
Identifies the device context.
iStartIndex
Specifies the first entry to be retrieved from the system palette.
nEntries
Specifies the number of entries to be retrieved from the system palette.
lppe
Points to an array of PALETTEENTRY structures to receive the palette entries. The array must contain at least as many data structures as specified by the nEntries parameter. If this parameter is NULL, the function will return the total number of entries in the palette. The PALETTEENTRY structure has the following format:
typedef struct tagPALETTEENTRY { /* pe */
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY;
The return value is the number of entries retrieved from the palette if the function is successful. Otherwise it is zero.
PALETTEENTRY