Platform SDK: DirectX

DirectDraw7.CreatePalette

The DirectDraw7.CreatePalette method creates a DirectDrawPalette object for this DirectDraw object.

object.CreatePalette( _ 
    flags As CONST_DDPCAPSFLAGS, _ 
    pe() As PALETTEENTRY) As DirectDrawPalette

Parameters

object
Object expression that resolves to a DirectDraw7 object.
flags
One or more of the constants of the CONST_DDPCAPSFLAGS enumeration.
pe()
Array of 2, 4, 16, or 256 PALETTEENTRY types to initialize this DirectDrawPalette object.

Return Values

If the method succeeds, it returns a DirectDrawPalette object.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_NOCOOPERATIVELEVELSET
DDERR_OUTOFMEMORY
DDERR_UNSUPPORTED