KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q47451: Black and White Text Modes Display in Color on Color System

Article: Q47451
Product(s): See article
Version(s): 2.00 2.01
Operating System(s): MS-DOS
Keyword(s): ENDUSER | S_C docerr | mspl13_c
Last Modified: 22-DEC-1989

Question :

The characteristics of the different video modes that you can obtain
with _setvidemode are listed in "C for Yourself" on Page 201. The two
black and white text modes, _TEXTBW40 and _TEXTBW80, both show 16 gray
shades as the available colors. When I set either of these modes, my
text is output in color rather than in gray shades. Why can't I get
gray tones?

Response :

The information in "C for Yourself" is accurate, but incomplete. The
chart under _setvideomode in the QuickC on-line help is more
informative. "C for Yourself" fails to explain that these modes do
provide 16 colors, unless you are using a monochrome display, in which
case you get 16 gray shades.

The "C 5.1 Run-time Library Reference" and the QuickC on-line help for
_setvideomode both list the black and white text modes as follows:

   Mode                Type      Size      Colors    Adapter
   ----                ----      ----      ------    -------

   _TEXTBW40           M/T       40x25     16        CGA
   _TEXTBW80           M/T       80x25     16        CGA

This table is followed by the footnote:

"For monochrome displays the number of colors is the number of gray
shades".

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 1986-2002.