DOCUMENT:Q85596 06-NOV-1999 [win16sdk] TITLE :BUG: SETCOLORTABLE Escape Disables Dithering PRODUCT :Microsoft Windows Software Development Kit PROD/VER:WINDOWS:3.1 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Windows Software Development Kit (SDK) 3.1 ------------------------------------------------------------------------------- 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. RESOLUTION ========== 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) STATUS ====== Microsoft has confirmed this to be a bug in Windows version 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. 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 query words: buglist3.10 3.10 ====================================================================== Keywords : Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310 Version : WINDOWS:3.1 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1999.