3.1 Metafile Header

The metafile header contains a description of the size of the metafile and the number of drawing objects it uses. The drawing objects can be pens, brushes, bitmaps, or fonts.

The metafile header has the following form:

typedef struct tagMETAHEADER {
    WORD  mtType;
    WORD  mtHeaderSize;
    WORD  mtVersion;
    DWORD mtSize;
    WORD  mtNoObjects;
    DWORD mtMaxRecord;
    WORD  mtNoParameters;
} METAHEADER;

Following are the members in the metafile header:

mtType

Specifies whether the metafile is stored in memory or recorded in a file. This member has one of the following values:

Value Meaning

0 Metafile is in memory.
1 Metafile is in a file.

mtHeaderSize

Specifies the size, in words, of the metafile header.

mtVersion

Specifies the Windows version number. The version number for Windows version 3.0 and later is 0x300.

mtSize

Specifies the size, in words, of the file.

mtNoObjects

Specifies the maximum number of objects that can exist in the metafile at the same time.

mtMaxRecord

Specifies the size, in words, of the largest record in the metafile.

mtNoParameters

Not used.