|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.
HRESULT MakeIdentityPalette( PALETTEENTRY *pEntry, INT iColours, LPSTR szDevice );
Pointer to an array of palette entries.
Number of palette entries in pEntry.
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.
Returns S_OK if successful or S_FALSE if unsuccessful.
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.