GetEnhMetaFilePixelFormat
The GetEnhMetaFilePixelFormat function retrieves pixel format information for an enhanced metafile.
UINT GetEnhMetaFilePixelFormat(
HENHMETAFILE hemf, // handle to an enhanced metafile
DWORD cbBuffer, // buffer size
CONST PIXELFORMATDESCRIPTOR * ppfd
// pointer to logical pixel format specification
);
Parameters
- hemf
Identifies the enhanced metafile. - cbBuffer
Specifies the size, in bytes, of the buffer into which the pixel format information is copied. - ppfd
Pointer to a PIXELFORMATDESCRIPTOR structure that contains the logical pixel format specification. The metafile uses this structure to record the logical pixel format specification.
Return Values
If the function succeeds and finds a pixel format, the return value is the size of the metafile's pixel format.
If no pixel format is present, the return value is zero.
If an error occurs and the function fails, the return value is GDI_ERROR. To get extended error information, call GetLastError.
Remarks
When an enhanced metafile specifies a pixel format in its ENHMETAHEADER structure and the pixel format fits in the buffer, the pixel format information is copied into ppfd. When cbBuffer is too small to contain the pixel format of the metafile, the pixel format is not copied to the buffer. In either case, the function returns the size of the metafile's pixel format.
For information on metafile recording and other operations, see Enhanced Metafile Operations.
See Also
OpenGL on Windows NT, Windows 2000, and Windows 95/98, Win32 Functions, ENHMETAHEADER, PIXELFORMATDESCRIPTOR