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

Creates a Metafile::Metafile object for recording.

Syntax

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

Parameters

[in] referenceHdc

Type: HDC

Windows handle to a device context that contains attributes of the display device that is used to record the metafile.

[in, ref] frameRect

Type: const Rect

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

Rect