Share via


Gdi::CreatePalette_I (Windows Embedded CE 6.0)

1/6/2010

This method creates a logical color palette.

Syntax

static WINGDIAPI HPALETTE WINAPI CreatePalette_I(
  CONST LOGPALETTE* lplgpl
);

Parameters

  • lplgpl
    [in] Long pointer to a LOGPALETTE structure that contains information about the colors in the logical palette.

Return Value

A handle that identifies a logical palette indicates success. NULL indicates failure. To get extended error information, call GetLastError.

Remarks

This method is an internal version of the CreatePalette function.

An application can determine whether a device supports palette operations by calling the Gdi::GetDeviceCaps_I method and specifying the RASTERCAPS constant.

Once an application creates a logical palette, the application can select that palette into a device context by calling the Gdi::SelectPalette_I method. You can realize a palette selected into a device context by calling the Gdi::RealizePalette_I method.

When you no longer need the palette, call the Gdi::DeleteObject_I method to delete the palette.

Because Windows Embedded CE does not arbitrate between the palettes of the foreground and background applications, Windows Embedded CE does not pad palettes with system colors. Therefore, the number of color entries in the palette created by this function is always the same as the palNumEntriesmember of the LOGPALETTE structure*.*

Requirements

Header gdi.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Gdi
CreatePalette (GDI)
Gdi::DeleteObject_I
Gdi::GetDeviceCaps_I
Gdi::RealizePalette_I
Gdi::SelectPalette_I
LOGPALETTE