Export (0) Print
Expand All

GetEnhMetaFileHeader function

The GetEnhMetaFileHeader function retrieves the record containing the header for the specified enhanced-format metafile.

Syntax


UINT GetEnhMetaFileHeader(
  _In_   HENHMETAFILE hemf,
  _In_   UINT cbBuffer,
  _Out_  LPENHMETAHEADER lpemh
);

Parameters

hemf [in]

A handle to the enhanced metafile for which the header is to be retrieved.

cbBuffer [in]

The size, in bytes, of the buffer to receive the data. Only this many bytes will be copied.

lpemh [out]

A pointer to an ENHMETAHEADER structure that receives the header record. If this parameter is NULL, the function returns the size of the header record.

Return value

If the function succeeds and the structure pointer is NULL, the return value is the size of the record that contains the header; if the structure pointer is a valid pointer, the return value is the number of bytes copied. Otherwise, it is zero.

Remarks

An enhanced-metafile header contains such information as the metafile's size, in bytes; the dimensions of the picture stored in the metafile; the number of records stored in the metafile; the offset to the optional text description; the size of the optional palette, and the resolution of the device on which the picture was created.

The record that contains the enhanced-metafile header is always the first record in the metafile.

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
ENHMETAHEADER
PlayEnhMetaFile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft