## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Updating the Logical Color Tables

To keep the logical color tables updated in all of the DCs, a field in each DC's instance data points to the device default palette that was current for that DC when the physical indexes into the palette were last calculated . When the EnterDriver function is called, it must check to see if this palette is the current device default palette for that DC. If it is not, EnterDriver updates the logical color table and the current device default palette field.

If the logical color table is one of the five defaults, it can be updated by changing it to point to the current default logical color table. If the logical color table is not one of the defaults, each index has to be recalculated using the current device default palette, which must calculate the nearest default physical index.