Metafile::Metafile method

Creates a Metafile::Metafile object for recording.

Syntax

void Metafile(
  IN HDC               referenceHdc,
  IN const Rect &      frameRect,
  IN MetafileFrameUnit frameUnit,
  IN EmfType           type,
  IN const WCHAR       *description
);

Parameters

referenceHdc

Type: HDC

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

frameRect

Type: const Rect

Reference to a rectangle that bounds the metafile display.

frameUnit

Type: MetafileFrameUnit

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

type

Type: EmfType

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

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

   
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