Metafile::GetHENHMETAFILE method (gdiplusheaders.h)
The Metafile::GetHENHMETAFILE method gets a Windows handle to an Enhanced Metafile (EMF) file.
Syntax
HENHMETAFILE GetHENHMETAFILE();
Return value
Type: HENHMETAFILE
This method returns a HENHMETAFILE.
Remarks
This method sets the Metafile object to an invalid state. The user is responsible for calling DeleteEnhMetafile, to delete the Windows handle.
Examples
The following example creates a Metafile object from an EMF+ file and gets a Windows handle to the metafile.
VOID Example_GetHENHMETAFILE(HDC hdc)
{
// Create a GDI+ Metafile object from an existing disk file.
Metafile metafile(L"SampleMetafile.emf+");
// Get a Windows handle to the metafile.
HENHMETAFILE hEmf = metafile.GetHENHMETAFILE();
}
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 |