This topic has not yet been rated Rate this topic

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

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Metafiles Overview
Metafile Functions
ENHMETAHEADER
PlayEnhMetaFile

 

 

Send comments about this topic to Microsoft

Build date: 9/7/2011

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ