The GetEnhMetaFilePixelFormat function retrieves pixel format information for an enhanced metafile.
UNIT GetEnhMetaFilePixelFormat(
HENHMETAFILE hemf,
// handle to an enhanced metafile
DWORD cbBuffer, // buffer size
CONST PIXELFORMATDESCRIPTOR * ppfd
// pointer to logical pixel format specification
);
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.
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.
OpenGL on Windows NT and Windows 95 Overview, Win32 Functions, ENHMETAHEADER, PIXELFORMATDESCRIPTOR