2.3.7 Object Creation Record Types

The Object Creation record types create graphics objects.

The following are EMF object creation record types.

Name

Section

Description

EMR_CREATEBRUSHINDIRECT

2.3.7.1

Defines a logical brush with a LogBrushEx object (section 2.2.12).

EMR_CREATECOLORSPACE

2.3.7.2

Defines a logical color space with a LogColorSpace object ([MS-WMF] section 2.2.2.11).

EMR_CREATECOLORSPACEW

2.3.7.3

Defines a logical color space with a LogColorSpaceW object ([MS-WMF] section 2.2.2.12).

EMR_CREATEDIBPATTERNBRUSHPT

2.3.7.4

Defines a pattern brush with a DeviceIndependentBitmap object ([MS-WMF] section 2.2.2.9).

EMR_CREATEMONOBRUSH

2.3.7.5

Defines a monochrome pattern brush with a monochrome DeviceIndependentBitmap object.

EMR_CREATEPALETTE

2.3.7.6

Defines a logical palette with a LogPalette object (section 2.2.17).

EMR_CREATEPEN

2.3.7.7

Defines a logical pen with a LogPen object (section 2.2.19).

EMR_EXTCREATEFONTINDIRECTW

2.3.7.8

Defines a logical font with either a LogFont object (section 2.2.13) or LogFontExDv object (section 2.2.15).

EMR_EXTCREATEPEN

2.3.7.9

Defines a logical pen with a LogPenEx object (section 2.2.20) and optional DeviceIndependentBitmap object.

The generic structure of object creation records is specified as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Type

Size

ObjectRecordBuffer (variable)

...

Type (4 bytes): An unsigned integer that defines the type of record. The object creation record types are listed in the following table. See the preceding table for descriptions of these record types.

Name

Value

EMR_CREATEMONOBRUSH

0x0000005D

EMR_CREATEDIBPATTERNBRUSHPT

0x0000005E

EMR_EXTCREATEPEN

0x0000005F

EMR_CREATECOLORSPACEW

0x0000007A

EMR_CREATEPEN

0x00000026

EMR_CREATEBRUSHINDIRECT

0x00000027

EMR_CREATEPALETTE

0x00000031

EMR_EXTCREATEFONTINDIRECTW

0x00000052

EMR_CREATECOLORSPACE

0x00000063

Size (4 bytes): An unsigned integer that specifies the size in bytes of this record in the metafile. This value MUST be a multiple of 4 bytes.

ObjectRecordBuffer (variable): An array of bytes that contains the remainder of the object creation record.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

ObjectRecordParm (variable)

...

AlignmentPadding (variable, optional)

...

ObjectRecordParm (variable): An array of bytes that contains the parameters for the object creation record.

AlignmentPadding (variable, optional): An array of up to 3 bytes that pads the record so that its total size is a multiple of 4 bytes. This field MUST be ignored.

See section 2.3 for more EMF record types.