Metafile::Metafile method

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

hEmf

Type: HENHMETAFILE

Windows handle to a metafile.

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

   
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