This topic has not yet been rated - Rate this topic

SetMetaFileBitsEx function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Metafiles Overview
Metafile Functions
DeleteMetaFile
GetMetaFileBitsEx
SetEnhMetaFileBits
SetWinMetaFileBits

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ