2.3.8.6 EMR_SELECTPALETTE Record

The EMR_SELECTPALETTE record selects a logical palette into the playback device context.


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

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

Size (4 bytes): An unsigned integer that specifies the size of this record in bytes. This value is 0x0000000C.

ihPal (4 bytes): An unsigned integer that specifies either the index of a LogPalette object (section 2.2.17) in the EMF object table (section 3.1.1.1) or the value DEFAULT_PALETTE from the StockObject enumeration (section 2.1.31), which is the index of a stock palette.

The object index MUST NOT be zero, which is reserved and refers to the EMF metafile itself.

The palette specified by this record MUST be used in subsequent EMF drawing operations, until another EMR_SELECTPALETTE record changes the object or the object is deleted.

See section 2.3.8 for more object manipulation record types.