Metafile.Metafile(IStream*, HDC, const RectF, MetafileFrameUnit, EmfType, const WCHAR*) constructor

Applies to: desktop apps only

Creates a Metafile::Metafile object for recording to an IStream interface.

Syntax

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

Parameters

  • stream [in]
    Type: IStream*

    Pointer to a COM IStream interface that points to a stream of data in a file. When the commands are recorded, they will be saved to this stream.

  • referenceHdc [in]
    Type: HDC

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

  • frameRect [in, ref]
    Type: const RectF

    Reference to a rectangle that bounds the metafile display.

  • frameUnit [in]
    Type: MetafileFrameUnit

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

  • type [in]
    Type: EmfType

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

  • description [in]
    Type: const WCHAR*

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

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

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusmetafile.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Metafile

EmfType

MetafileFrameUnit

RectF

Loading and Displaying Metafiles

Recording Metafiles

Metafiles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012