GetMetaFileBitsEx function
Applies to: desktop apps only
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 |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Metafiles Overview
- Metafile Functions
- DeleteMetaFile
- GetEnhMetaFileBits
- SetMetaFileBitsEx
- SetWinMetaFileBits
Send comments about this topic to Microsoft
Build date: 3/7/2012