SetEnhMetaFileBits function (wingdi.h)

The SetEnhMetaFileBits function creates a memory-based enhanced-format metafile from the specified data.

Syntax

HENHMETAFILE SetEnhMetaFileBits(
  UINT       nSize,
  const BYTE *pb
);

Parameters

nSize

Specifies the size, in bytes, of the data provided.

pb

Pointer to a buffer that contains enhanced-metafile data. (It is assumed that the data in the buffer was obtained by calling the GetEnhMetaFileBits function.)

Return value

If the function succeeds, the return value is a handle to a memory-based enhanced metafile.

If the function fails, the return value is NULL.

Remarks

When the application no longer needs the enhanced-metafile handle, it should delete the handle by calling the DeleteEnhMetaFile function.

The SetEnhMetaFileBits function does not accept metafile data in the Windows format. To import Windows-format metafiles, use the SetWinMetaFileBits function.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

DeleteEnhMetaFile

GetEnhMetaFileBits

Metafile Functions

Metafiles Overview

SetWinMetaFileBits