Skip to content

Latest commit

 

History

History
107 lines (71 loc) · 4.46 KB

nf-wingdi-getenhmetafilepaletteentries.md

File metadata and controls

107 lines (71 loc) · 4.46 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wingdi.GetEnhMetaFilePaletteEntries
GetEnhMetaFilePaletteEntries function (wingdi.h)
The GetEnhMetaFilePaletteEntries function retrieves optional palette entries from the specified enhanced metafile.
GetEnhMetaFilePaletteEntries
GetEnhMetaFilePaletteEntries function [Windows GDI]
_win32_GetEnhMetaFilePaletteEntries
gdi.getenhmetafilepaletteentries
wingdi/GetEnhMetaFilePaletteEntries
gdi\getenhmetafilepaletteentries.htm
gdi
2d61fd6a-cebd-457e-ad00-d3e8bd15584a
12/05/2018
GetEnhMetaFilePaletteEntries, GetEnhMetaFilePaletteEntries function [Windows GDI], _win32_GetEnhMetaFilePaletteEntries, gdi.getenhmetafilepaletteentries, wingdi/GetEnhMetaFilePaletteEntries
wingdi.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Gdi32.lib
Gdi32.dll
Windows
19H1
GetEnhMetaFilePaletteEntries
wingdi/GetEnhMetaFilePaletteEntries
c++
APIRef
kbSyntax
DllExport
gdi32.dll
Ext-MS-Win-GDI-Metafile-L1-1-2.dll
GDI32Full.dll
GetEnhMetaFilePaletteEntries

GetEnhMetaFilePaletteEntries function

-description

The GetEnhMetaFilePaletteEntries function retrieves optional palette entries from the specified enhanced metafile.

-parameters

-param hemf [in]

A handle to the enhanced metafile.

-param nNumEntries [in]

The number of entries to be retrieved from the optional palette.

-param lpPaletteEntries [out]

A pointer to an array of PALETTEENTRY structures that receives the palette colors. The array must contain at least as many structures as there are entries specified by the cEntries parameter.

-returns

If the array pointer is NULL and the enhanced metafile contains an optional palette, the return value is the number of entries in the enhanced metafile's palette; if the array pointer is a valid pointer and the enhanced metafile contains an optional palette, the return value is the number of entries copied; if the metafile does not contain an optional palette, the return value is zero. Otherwise, the return value is GDI_ERROR.

-remarks

An application can store an optional palette in an enhanced metafile by calling the CreatePalette and SetPaletteEntries functions before creating the picture and storing it in the metafile. By doing this, the application can achieve consistent colors when the picture is displayed on a variety of devices.

An application that displays a picture stored in an enhanced metafile can call the GetEnhMetaFilePaletteEntries function to determine whether the optional palette exists. If it does, the application can call the GetEnhMetaFilePaletteEntries function a second time to retrieve the palette entries and then create a logical palette (by using the CreatePalette function), select it into its device context (by using the SelectPalette function), and then realize it (by using the RealizePalette function). After the logical palette has been realized, calling the PlayEnhMetaFile function displays the picture using its original colors.

-see-also

CreatePalette

Metafile Functions

Metafiles Overview

PALETTEENTRY

PlayEnhMetaFile

RealizePalette

SelectPalette