SetMetaFileBitsEx function

The SetMetaFileBitsEx function creates a memory-based Windows-format metafile from the supplied data.

Note  This function is provided only for compatibility with Windows-format metafiles. Enhanced-format metafiles provide superior functionality and are recommended for new applications. The corresponding function for an enhanced-format metafile is SetEnhMetaFileBits.
 

Syntax


HMETAFILE SetMetaFileBitsEx(
  _In_       UINT nSize,
  _In_ const BYTE *lpData
);

Parameters

nSize [in]

Specifies the size, in bytes, of the Windows-format metafile.

lpData [in]

Pointer to a buffer that contains the Windows-format metafile. (It is assumed that the data was obtained by using the GetMetaFileBitsEx function.)

Return value

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

If the function fails, the return value is NULL.

Remarks

To convert a Windows-format metafile into an enhanced-format metafile, use the SetWinMetaFileBits function.

When the application no longer needs the metafile handle returned by SetMetaFileBitsEx, it should delete it by calling the DeleteMetaFile function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Metafiles Overview
Metafile Functions
DeleteMetaFile
GetMetaFileBitsEx
SetEnhMetaFileBits
SetWinMetaFileBits

 

 

Show: