Microsoft DirectX 8.1 (C++) |
Specifies an entry point for creating and installing palettes.
Syntax
HRESULT PreparePalette(
const CMediaType *pmtNew,
const CMediaType *pmtOld,
LPSTR szDevice
);
Parameters
pmtNew
Pointer to the media type holding new palette information.
pmtOld
Pointer to the media type holding old palette information.
szDevice
Pointer to an string that contains the name of the destination device. If omitted, this parameter defaults to the main device.
Return Value
Returns an HRESULT value.
Remarks
This is the main entry point for creating new palettes. It tries to detect situations where the palette colors requested have not changed (in which case it does not need to create a new palette). It uses the old media type to determine if the colors have changed. It also handles optionally installing the palette in a window (if supplied) and notifying the filter graph manager of a change in palettes (it uses the filter passed in to the constructor for this). Finally, it handles notifying the draw object of palette changes (also optional, depending on whether a draw object was passed in to the constructor).
See Also