SHCreateShellPalette function (shlwapi.h)

Creates a halftone palette for the specified device context.

Syntax

HPALETTE SHCreateShellPalette(
  [in, optional] HDC hdc
);

Parameters

[in, optional] hdc

Type: HDC

The device context.

Return value

Type: HPALETTE

Returns the palette if successful; otherwise 0.

Remarks

This function behaves the same as CreateHalftonePalette. The palette that is returned depends on the device context in the following way:

  • If hdc is set to NULL, a full palette is returned.
  • If the device context is indexed, a full palette is returned.
  • If the device context is not indexed, a default palette (VGA colors) is returned.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (version 4.71 or later)