CreateHalftonePalette function (wingdi.h)

The CreateHalftonePalette function creates a halftone palette for the specified device context (DC).

Syntax

HPALETTE CreateHalftonePalette(
  [in] HDC hdc
);

Parameters

[in] hdc

A handle to the device context.

Return value

If the function succeeds, the return value is a handle to a logical halftone palette.

If the function fails, the return value is zero.

Remarks

An application should create a halftone palette when the stretching mode of a device context is set to HALFTONE. The logical halftone palette returned by CreateHalftonePalette should then be selected and realized into the device context before the StretchBlt or StretchDIBits function is called.

When you no longer need the palette, call the DeleteObject function to delete it.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

Color Functions

Colors Overview

DeleteObject

RealizePalette

SelectPalette

SetStretchBltMode

StretchBlt

StretchDIBits