Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CreateHalftonePalette function

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

Syntax


HPALETTE CreateHalftonePalette(
  _In_  HDC hdc
);

Parameters

hdc [in]

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Colors Overview
Color Functions
DeleteObject
RealizePalette
SelectPalette
SetStretchBltMode
StretchDIBits
StretchBlt

 

 

Community Additions

Show:
© 2015 Microsoft