|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
DirectDraw on Windows CE only supports 8-bit (256 entry) palettes. A palette can only be attached to a surface that has a matching pixel format.
Additionally, you can create palettes that don't contain a color table at all, known as index palettes. Instead of a color table, an index palette contains index values that represent locations in another palette's color table.
To create an indexed palette, specify the DDPCAPS_8BITENTRIES flag when calling the IDirectDraw4::CreatePalettemethod. When you create an indexed palette, you pass a pointer to an array of bytes rather than a pointer to an array of PALETTEENTRYstructures. You must cast the pointer to the array of bytes to an LPPALETTEENTRYtype when you use the IDirectDraw4::CreatePalettemethod.
Note that DirectDraw does not dereference index palette entries during blit operations.
Last updated on Tuesday, May 18, 2004