Metafile::Metafile(constWCHAR*,HDC,constRectF&,MetafileFrameUnit,EmfType,constWCHAR*) method (gdiplusheaders.h)

Creates a Metafile::Metafile object for recording.

Syntax

void Metafile(
  [in]      const WCHAR       *fileName,
  [in]      HDC               referenceHdc,
  [in, ref] const RectF &     frameRect,
  [in]      MetafileFrameUnit frameUnit,
  [in]      EmfType           type,
  [in]      const WCHAR       *description
);

Parameters

[in] fileName

Type: const WCHAR*

Pointer to a wide-character string that specifies the name of the file in which the metafile will be saved.

[in] referenceHdc

Type: HDC

Windows handle to a device context that contains attributes of a display device.

[in, ref] frameRect

Type: const RectF

Reference to a rectangle that bounds the metafile display.

[in] frameUnit

Type: MetafileFrameUnit

Optional. Element of the MetafileFrameUnit enumeration that specifies the unit of measure for frameRect. The default value is MetafileFrameUnitGdi.

[in] type

Type: EmfType

Optional. Element of the EmfType enumeration that specifies the type of metafile that will be recorded. The default value is EmfTypeEmfPlusDual.

[in] description

Type: const WCHAR*

Optional. Pointer to a wide-character string that specifies the descriptive name of the metafile. The default value is NULL.

Return value

None

Remarks

When recording to a file, the file must be writable, and Windows GDI+ must be able to obtain an exclusive lock on the file.

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

EmfType

Loading and Displaying Metafiles

Metafile

MetafileFrameUnit

Metafiles

Recording Metafiles

RectF