GetEnhMetaFileHeader function (wingdi.h)
The GetEnhMetaFileHeader function retrieves the record containing the header for the specified enhanced-format metafile.
Syntax
UINT GetEnhMetaFileHeader(
[in] HENHMETAFILE hemf,
[in] UINT nSize,
[out] LPENHMETAHEADER lpEnhMetaHeader
);
Parameters
[in] hemf
A handle to the enhanced metafile for which the header is to be retrieved.
[in] nSize
The size, in bytes, of the buffer to receive the data. Only this many bytes will be copied.
[out] lpEnhMetaHeader
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |