Q35303: Using PRINT SCREEN Key to Print CGA Graphics

Article: Q35303
Product(s): See article
Version(s): 5.00 5.10
Operating System(s): MS-DOS
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 27-OCT-1988

To print graphics generated by a C program using the PRINT SCREEN key,
you must first install GRAPHICS.COM (supplied by your DOS). This
process only will work with the CGA modes. Hercules, EGA, and VGA modes
will not print with this method; you must obtain a third party, public
domain, or shareware program to print graphics from these modes.

In the DOS environment, PRINT SCREEN prints any text screen to an
attached printer hooked to PRN. This function isn't able to interpret
a graphic screen to the printer because a graphic screen is defined
and produced differently than a text screen.

A unit of area is defined by a pixel rather than a character. (This
can be noticed by the way a text screen is described "80 columns by 25
rows" as opposed to a graphics screen "640 pixels by 200 pixels.")

DOS supplies a TSR that allows the PRINT SCREEN to interpret a graphic
screen. This is called GRAPHICS.COM. When it is installed, it will
interpret a CGA graphic screen to a printer attached to PRN. This
utility must be installed before running a C program that draws a
graphic screen in the CGA modes, i.e., the program must have specified
a _setvideomode to _MRES4COLOR, _MRESNOCOLOR, or _HRESBW. Any of the
other video modes will require some other utility to interpret the
screen for the printer.

It also should be noted that GRAPHICS.COM was written to write to an
IBM Personal Graphics or IBM Personal Color Printer. It may be
necessary on some other printers to set some switch settings, if
available, to emulate either of these printers. The printer manual for
the specific printer should be consulted in these cases.