Author: HarishHarish
Date: May 6, 2008 08:52
Our application uses Windows GDI library to perform rendering and
display of data/output onto
the devices such as Screen and Printer.
While I am trying to print the data onto a series of printers (HP
1010, HP 1018, HP 1020 and HP
3050) I am facing a typical problem.
Explaination
------------------
1. Appropriate DC for the intended device is created [Printer DC
created for a selected printer in this case]
2. The data is displayed onto the identified position onto the DC
The details of data (fields) to be displayed and their position onto
the DC is calculated before the printing begins.
If sufficient space is available for displaying/printing a field
(data), then it is displayed directly onto the DC (using TextOut.
However at situations, the space available for printing (displaying) a
piece of data may not be enough. In such scenario, I display such
information onto a temperory (display) DC and then perform
StretchBlt(....) onto the printer DC.
|