INF: Using PRINT SCREEN Key to Print CGA Graphics

ID Number: Q35303

5.00 5.10 6.00 6.00a 6.00ax 7.00

MS-DOS

Summary:

In Microsoft C versions 5.0, 5.1, 6.0, 6.0a, 6.0ax, and C/C++ version

7.0, to print graphics generated by a C program using the PRINT SCREEN

key, you must first install GRAPHICS.COM (supplied by MS-DOS). In

older versions of GRAPHICS.COM, this will work only with the CGA

modes. Hercules, EGA, and VGA modes do not print with this method; you

must obtain a third party, public domain, or shareware program to

print graphics from these modes. However, the GRAPHICS.COM that ships

with MS-DOS version 5.0 supports CGA, EGA, and VGA.

More Information:

In the MS-DOS environment, PRINT SCREEN prints any text screen to an

attached printer hooked to PRN. This function can't 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 graphic screen "640 pixels by 200 pixels.")

MS-DOS supplies a TSR (terminate-and-stay-resident) program,

GRAPHICS.COM, that allows the PRINT SCREEN to interpret a graphic

screen. When the GRAPHICS.COM 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; that is, 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 intended 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.

Additional reference words: prntscrn printscrn print scrn 5.00 5.10

6.00 6.00a 6.00ax 7.00