Microsoft DirectX 9.0 |
The MakeIdentityPalette method attempts to make an "identity palette," defined as one that maps directly to the palette selected in the display device.
Syntax
HRESULT MakeIdentityPalette(
PALETTEENTRY *pEntry,
INT iColours,
LPSTR szDevice
);
Parameters
pEntry
Pointer to an array of palette entries.
iColours
Number of palette entries in pEntry.
szDevice
Pointer to a string that contains the name of the display device, as returned by the GDI EnumDisplayDevices function. To use the main display device, set this parameter to NULL.
Return Value
Returns S_OK if successful or S_FALSE if unsuccessful.
Remarks
This method compares the reserved entries in the system palette against the corresponding entries in the pEntry array. If they match exactly, the method sets the PC_NOCOLLAPSE flag in the remaining (non-reserved) palette entries in pEntry. This flag prevents GDI from trying map logical palette entries to system palette entries.
The CImagePalette::MakePalette method calls this method.
See Also