INF: How to Correctly Set Up a Raster Display Device Driver

ID Number: Q25335

2.00 2.03 2.10 3.00

WINDOWS

Summary:

The following information describes how to set up a raster display

device driver that will be able to draw on the screen, draw into main

memory, and draw into main memory bitmaps.

The device must be declared to be a raster device, capable of drawing

scanlines and polylines. Scanlines and polylines are required of all

display drivers. The device driver must be capable of drawing

scanlines and polylines into the following:

1. Into the device's screen.

2. Into main memory: one plane, 1-bit-per-pixel bitmaps. The

programmer can take the existing EGAHIBW sources to all of the

routines (for example, BITBLT, OUTPUT, SCANLR, PIXEL, and so on)

and call the code in them to accomplish the drawing into monochrome

bitmaps. Remove the cursor-exclusion code in these routines to save

space.

3. Into main memory bitmaps that have the same color format as the

device's screen. The programmers must write their own routines to

accomplish this nontrivial task. GDI cannot "magically" draw into

bitmaps; it is left to the device driver to accomplish this task.

For more information on this topic, see sections 2.2.2, 2.2.3, and

2.13 of the "Microsoft Windows Device Driver Adaptation Guide."