Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GetEnhMetaFilePixelFormat function

Applies to: desktop apps only

The GetEnhMetaFilePixelFormat function retrieves pixel format information for an enhanced metafile.

Syntax

UINT WINAPI GetEnhMetaFilePixelFormat(
  HENHMETAFILE hemf,
  DWORD cbBuffer,
  const PIXELFORMATDESCRIPTOR *ppfd
);

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 value

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.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wingdi.h

Library

Gdi32.lib

DLL

Gdi32.dll

See also

OpenGL on Windows
Windows Functions
ENHMETAHEADER
PIXELFORMATDESCRIPTOR

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2015 Microsoft