2.3.7.6 EMR_CREATEPALETTE Record

The EMR_CREATEPALETTE record defines a logical palette for graphics operations.

Fields not specified in this section are specified in section 2.3.7.


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

ihPal

LogPalette (variable)

...

Type (4 bytes): An unsigned integer that identifies this record type as EMR_CREATEPALETTE. This value is 0x00000031.

ihPal (4 bytes): An unsigned integer that specifies the index of the logical palette object in the EMF object table (section 3.1.1.1). This index MUST be saved so that this object can be reused or modified.

LogPalette (variable): A LogPalette object (section 2.2.17). The Version field of this object MUST be set to 0x0300. If the NumberOfEntries value in this object is zero, processing of this record MUST fail.

The logical palette defined by this record can be selected into the playback device context by an EMR_SELECTPALETTE record (section 2.3.8.6), which specifies the logical palette to use in subsequent graphics operations.

See section 2.3.7 for more object creation record types.