DirectX SDK

DirectDraw7.LoadPaletteFromBitmap

The DirectDraw7.LoadPaletteFromBitmap method creates a DirectDrawPalette object, based on the palette of the specified bitmap for this DirectDraw object.

object.LoadPaletteFromBitmap( _ 
    bName As String) As DirectDrawPalette

Parameters

object
Object expression that resolves to a DirectDraw7 object.
bName
Name of the bitmap from which to load the palette.

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