CImagePalette::MakeIdentityPalette
Microsoft DirectShow 9.0 |
CImagePalette::MakeIdentityPalette
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.
Requirements
** Header:** Declared in Winutil.h; include Streams.h.
** Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
See Also