PRWIN9206005: SETCOLORTABLE Escape Disables Dithering

ID Number: Q85596

3.10

WINDOWS

buglist3.10

Summary:

PROBLEM ID: WIN9206005

SYMPTOMS

When the VGAPAL video driver is installed on a system, once an

application calls the SETCOLORTABLE escape to change an entry in

the color table associated with a device context, Windows does not

create any dithered brushes for that device context. Instead,

Windows returns the solid brush that most closely matches the

requested color.

STATUS

Microsoft has confirmed this to be a problem in Windows version

3.1. We are researching this problem and will post new information

here as it becomes available.

To work around this problem, reset the color table to its original

state by specifying NULL as the value of the lpInData and lpOutData

parameters in a call to the SETCOLORTABLE escape, as follows:

Escape(hDC, SETCOLORTABLE, 0, NULL, NULL)

More Information:

The SETCOLORTABLE escape is documented on pages 500 and 501 of the

"Microsoft Software Development Kit: Programmer's Reference, Volume 3:

Messages, Structures and Macros" manual.

The comments regarding this escape state the following:

- The color-mapping algorithms in the display driver will most likely

not work with a changed palette.

- If the color index pointed to by the lpInData parameter is 0xFFFF,

the calling application performs all color mapping.

- Once an application restores the color table to its original state,

an application can enable the color-mapping algorithms in the

display driver.

However, with the VGAPAL driver, calling the SETCOLORTABLE escape with

lpInData pointing to the 0xFFFE value does not restore dithering.

Additional reference words: 3.10