3.2 Typical Metafile Record

The graphics device interface stores most of the GDI functions that an application can use to create metafiles in typical records.

A typical metafile record has the following form:

struct {
    DWORD rdSize;
    WORD  rdFunction;
    WORD  rdParm[];
}

Following are the members in a typical metafile record:

rdSize

Specifies the size, in words, of the record.

rdFunction

Specifies the function number. This value may be the number of any function in the table at the end of this section.

rdParm

Identifies an array of words containing the function parameters (listed in the reverse order in which they are passed to the function).

Following are the GDI functions found in typical records, along with their hexadecimal values:

GDI function Value

Arc 0x0817
Chord 0x0830
Ellipse 0x0418
ExcludeClipRect 0x0415
FloodFill 0x0419
IntersectClipRect 0x0416
LineTo 0x0213
MoveTo 0x0214
OffsetClipRgn 0x0220
OffsetViewportOrg 0x0211
OffsetWindowOrg 0x020F
PatBlt 0x061D
Pie 0x081A
RealizePalette (3.0 and later) 0x0035
Rectangle 0x041B
ResizePalette (3.0 and later) 0x0139
RestoreDC 0x0127
RoundRect 0x061C
SaveDC 0x001E
ScaleViewportExt 0x0412
ScaleWindowExt 0x0400
SetBkColor 0x0201
SetBkMode 0x0102
SetMapMode 0x0103
SetMapperFlags 0x0231
SetPixel 0x041F
SetPolyFillMode 0x0106
SetROP2 0x0104
SetStretchBltMode 0x0107
SetTextAlign 0x012E
SetTextCharExtra 0x0108
SetTextColor 0x0209
SetTextJustification 0x020A
SetViewportExt 0x020E
SetViewportOrg 0x020D
SetWindowExt 0x020C
SetWindowOrg 0x020B

For more information on GDI functions, see the Microsoft Windows Programmer's Reference, Volume 2. For more information on the function-specific metafile records, see Section 3.6, “Function-Specific Metafile Records.”