Metafile::Metafile(HENHMETAFILE,BOOL) method (gdiplusheaders.h)

Creates a Windows GDI+ Metafile::Metafile object for playback based on a Windows Graphics Device Interface (GDI) Enhanced Metafile (EMF) file.

Syntax

void Metafile(
  [in] HENHMETAFILE hEmf,
  [in] BOOL         deleteEmf
);

Parameters

[in] hEmf

Type: HENHMETAFILE

Windows handle to a metafile.

[in] deleteEmf

Type: BOOL

Optional. Boolean value that specifies whether the Windows handle to a metafile is deleted when the Metafile::Metafile object is deleted. TRUE specifies that the hEmf Windows handle is deleted, and FALSE specifies that the hEmf Windows handle is not deleted. The default value is FALSE.

Return value

None

Remarks

This constructor allows GDI+ to own the windows handle to the metafile, which should not be used by other portions of your code until the Metafile::Metafile object is deleted or goes out of scope.

Requirements

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

See also

Loading and Displaying Metafiles

Metafile

Metafile::GetHENHMETAFILE

Metafiles

Recording Metafiles