Microsoft DirectX 9.0 |
The SetEntries method changes entries in a palette. The changes are made immediately. The palette must be attached to a surface using the SetPalette method before SetEntries can be used.
Syntax
HRESULT SetEntries(
DWORD dwFlags,
DWORD dwStartingEntry,
DWORD dwCount,
LPPALETTEENTRY lpEntries
);
Parameters
dwFlags
Reserved. Must be zero.
dwStartingEntry
The first entry to be set.
dwCount
The number of palette entries to be changed.
lpEntries
The palette entries are one byte each if the DDPCAPS_8BITENTRIES flag is set in DDCAPS.dwPalCaps and four bytes otherwise. Each field is a color description.
Return Values
Value | Description |
DD_OK | The method succeeded. |
DDERR_UNSUPPORTED | Action not supported. |
DDERR_INVALIDOBJECT | DirectDraw received a pointer that was an invalid DirectDraw object. |
DDERR_INVALIDPARAMS | One or more of the parameters passed to the function are incorrect. |
DDERR_NOTPALETTIZED | The surface being used is not a palette-based surface. |
DDERR_NOPALETTEATTACHED | No palette object attached to this surface. |
See Also