Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  
  Under Windows, you can print in two ways: "direct" to the
  printer, or via GDI (graphics device interface).
  
  In the "direct" case, the output may actually be intercepted,
  e.g. by the Print Manager.  This typically delays output and
  imposes extra load on your computer, but does provide spooled
  output.
  
  Clipper's existing printer functions result in "direct"
  printing.
  
  Of more interest, perhaps, is to print using GDI.  To do this
  all you need is to get a handle to a printer device context,
  instead of a handle to a display device context.  Then you can
  use the many GDI functions as usual.
  
  You should bear in mind that printers and displays have
  different capabilities, resolutions, and so on.  The
  GetDeviceCaps() function returns information about a device's
  actual abilities.
  
  You can get a handle to a printer device context by calling
  the GetPrintDC() function or the CreateDC() function.  The
  GetPrintDC() function displays a printer dialog box so that
  the user can choose the printer settings, whereas CreateDC()
  uses the default settings (and is a bit more awkward to call).
  
  Printers often have rather more resolution than displays,
  which in turn tends to mean that images to be printed need a
  lot of memory.  To reduce the amount needed, Windows uses a
  technique called banding.  That is, the image is split into a
  number of rectangular bands across or down the page, and each
  band is produced in turn.  Since features of the image can
  cross bands in any manner, something has to be prepared to be
  told the co-ordinates of each band and then draw just that
  band.
  
  Often, Windows programs handle banding themselves.  This can
  be faster, and reduces the memory/disk needed.  However, it is
  rather a pain to do, so is not currently forced on you by Clip-
  4-Win.  The alternative is to let GDI handle the problem,
  which it does using a metafile.  This is a temporary file used
  to collect the printing instructions in a high-level form.
  Then GDI can "play back" the information as banding takes
  place.  This is another reason why printing is often slow
  under Windows.  It may also explain the disk activity you may
  notice.
  


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson