Export (0) Print
Expand All

GetMetaFileBitsEx function

The GetMetaFileBitsEx function retrieves the contents of a Windows-format metafile and copies them into the specified buffer.

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 GetEnhMetaFileBits.

Syntax


UINT GetMetaFileBitsEx(
  _In_   HMETAFILE hmf,
  _In_   UINT nSize,
  _Out_  LPVOID lpvData
);

Parameters

hmf [in]

A handle to a Windows-format metafile.

nSize [in]

The size, in bytes, of the buffer to receive the data.

lpvData [out]

A pointer to a buffer that receives the metafile data. The buffer must be sufficiently large to contain the data. If lpvData is NULL, the function returns the number of bytes required to hold the data.

Return value

If the function succeeds and the buffer pointer is NULL, the return value is the number of bytes required for the buffer; if the function succeeds and the buffer pointer is a valid pointer, the return value is the number of bytes copied.

If the function fails, the return value is zero.

Remarks

After the Windows-metafile bits are retrieved, they can be used to create a memory-based metafile by calling the SetMetaFileBitsEx function.

The GetMetaFileBitsEx function does not invalidate the metafile handle. An application must delete this handle by calling the DeleteMetaFile function.

To convert a Windows-format metafile into an enhanced-format metafile, use the SetWinMetaFileBits 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
GetEnhMetaFileBits
SetMetaFileBitsEx
SetWinMetaFileBits

 

 

Community Additions

ADD
Show:
© 2014 Microsoft