home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / c / samples / print / prtsamp.tx_ / prtsamp.txt
Encoding:
Text File  |  1993-03-22  |  5.1 KB  |  98 lines

  1. Print Sample Application
  2. ------------------------
  3.  
  4. This is a sample application which shows how to print text and graphics under
  5. OS/2. It also shows how to handle printer queues, job properties, and fonts.
  6. The time-consuming parts are handled by separate threads.
  7.  
  8. Detailed information about this application and the how to print from
  9. applications can be found in "OS/2 2.0 Programming Guide Volume 3, chapter
  10. 18".
  11.  
  12. This print Sample has been updated from the 2.0 print sample. There are
  13. several major changes and several fixes to problems in the original sample
  14. or fixes where it did not match the recommendations in the programming guide.
  15.  
  16. Major changes since laster version of Print Sample
  17. --------------------------------------------------
  18.  
  19. 1. Added page setup dialog (see PRTPAGE.C). The duplex option is not
  20. implemented. There are several changes throughout PRTOBJ.C, PRTPRINT.C
  21. and PRTSAMP.C to take form names and margins into account. For example there
  22. is some form matching between different printers and if form changes to a new
  23. name then an error message is displayed. If the form the user choose does
  24. not match the one in job properties then an error message is displayed and the
  25. job properties dialog shown.
  26. 2. The print dialog has been updated to include the page selection fields (see
  27. PRTPRINT.C PrintDlgProc). The preview option is not implemented as it is not
  28. required for this sample. There are several changes in PRTPRINT.C for
  29. print dialog, print confirmation dialog and actual printing.
  30. 3. Added a horizontal scroll bar. When the client window is sized, the window
  31. keeps in the current position rather than always homing to the top left of the
  32. client area.
  33. 4. Mouse button 1 double-click in the printer setup dialog has the same effect
  34. as pressing the OK pushbutton (see PRTPRINT.C QueryPrintDlgProc).
  35. 5. Added support for a command line argument. This means that the program will
  36. respond correctly when started from the Workplace shell from either a drag/drop
  37. onto the print sample or through a file association (see PRTOBJ.C ObjectWndProc)
  38. 6. Restore the window position (see PRTPROF.C GetProfileInfo)
  39. 7. Draw the bitmap or metafile at the top of the page instead of the bottom
  40. (see PRTOBJ.C PaintBitmap and PaintMetafile functions).
  41.  
  42. Miscellaneous fixes made since last version of Print Sample
  43. -----------------------------------------------------------
  44.  
  45. 1. The area around the data shown on the screen used to get smaller when the
  46. picture was zoomed. It now is always 0.25 inch (various places).
  47. 2. Fixed problem when a previously selected queue is no longer available (see
  48. PRTPRINT QueryPrintQueue).
  49. 3. Coordinates for printer are different to screen because of hardware clip
  50. limits (see PRTOBJ.C CalculateDrawingArea)
  51. 4. The number of copies in the print dialog is not saved until the user
  52. presses OK (see PRTPRINT.C PrintDlgProc).
  53. 5. Check that the device name and driver data size is correct (see
  54. PRTPRINT.C QueryPrintQueue)
  55. 6. Parse filename correctly if it does not contain a \ (various places)
  56. 7. Get filetype from EA value not EA type indication (see PRTMENU.C
  57. GetEAFileType)
  58.  
  59.  
  60. Fixes made to meet recommendations for OS/2 Printing
  61. ----------------------------------------------------
  62.  
  63. 1. Now use FORM= parameter on DevOpenDC for printer
  64. (see PRTPRINT ProcessUserPrint)
  65. 2. Add WinCancelShutdown on object window (see PRTOBJ threadmain)
  66. 3. The accelerator for printing (Shift Print Screen) has been implemented
  67. (see PRTSAMP.RC)
  68. 4. All message boxes for the user have been standardized (various places).
  69. 5. All translatable strings except for debug error messages have been put in
  70. PRTSAMP.RC
  71. 6. Display and printing of bitmaps now uses GpiWCBitBlt instread of GpiBitBlt
  72. (see PRTOBJ.C PaintBitmap)
  73. 7. Bitmaps are now printed with PM_Q_STD, not PM_Q_RAW (see PRTPRINT.C
  74. ProcessUserPrint)
  75. 8. The same code is now used for drawing and printing bitmaps and metafiles.
  76. For example device independent bitmaps can now be drawn on the screen. See the
  77. functions PaintBitmap and PaintMetafile in PRTOBJ.C.
  78. 9. Replaced DosExit by _endthread (see PRTOBJ.C threadmain)
  79. 10. GpiCreatePS for now passes 0,0 as the printer PS size (see PRTPRINT.C
  80. ProcessUserPrint)
  81.  
  82. Things you can do to improve this application
  83. ---------------------------------------------
  84.  
  85. 1. Wrap text when it is outside the user define margins. This is required for
  86. a word-processor. The text is left clipped to show how a clip path can be used
  87. to enforce the user-defined margins.
  88. 2. Allow the user to page backward through a multi-page document. This requires
  89. more extensive formatting on a separate thread but has the advantage that the
  90. user can tell exactly how large the document is and what is the current page.
  91. 3. Allow the user to do title-bar drag/drop onto a printer.
  92. 4. Allow the user to drag/drop a file associated with this application onto
  93. a printer. PRTSAMP is then called with the DM_PRINTOBJECT message.
  94. 5. Allow for BMP files that contain an array of bitmaps.
  95. 6. Support ICO and PTR files.
  96. 7. Support device fonts and character positioning of a screen font according
  97. to the device font characteristics.
  98.