home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk14 / doc.pak / WINPRN.INT < prev    next >
Encoding:
Text File  |  1995-08-24  |  2.2 KB  |  58 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Runtime Library                          }
  5. {       Windows Simplified Printer Interface Unit       }
  6. {                                                       }
  7. {       Copyright (c) 1991,94 Borland International     }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit WinPrn;
  12.  
  13. {$S-}
  14.  
  15. interface
  16.  
  17. uses WinTypes;
  18.  
  19. { AbortPrn will cause all unprinted portions of the writes to the  }
  20. { file to be thrown away. Note: the file still must be closed.     }
  21.  
  22. procedure AbortPrn(var F: Text);
  23.  
  24. { AssignPrn assigns a file to a printer.  The Device, Driver, and  }
  25. { Port can be retrieved from the WIN.INI file's [device] section   }
  26. { or from the [windows] sections 'device' string. If Device is nil }
  27. { the default printer is used.                                     }
  28.  
  29. procedure AssignPrn(var F: Text; Device, Driver, Port: PChar);
  30.  
  31. { AssignDefPrn calls AssignPrn with Device equal to nil.           }
  32.  
  33. procedure AssignDefPrn(var F: Text);
  34.  
  35. { SetPrnFont will cause the file to begin printing using the given }
  36. { font.  The old font is returned.                                 }
  37.  
  38. function SetPrnFont(var F: Text; Font: HFont): HFont;
  39.  
  40. { TitlePrn will give a title to the file being printed which is    }
  41. { displayed by Window's Print Manager.  For this routine to have   }
  42. { effect it needs to be called before ReWrite.                     }
  43.  
  44. procedure TitlePrn(var F: Text; Title: PChar);
  45.  
  46. { ProcessPrnMessage is called whenever a message is received by    }
  47. { WinPrn's abort procedure.  If the function returns false, the    }
  48. { message is translated and dispatched, otherwise it is ignored.   }
  49. { Use this variable if you wish modeless dialogs to continue to    }
  50. { operate while printing.  (Note: Since ObjectWindow automatically }
  51. { initializes this variable for KBHandler's, no special action is  }
  52. { necessary when using ObjectWindows).                             }
  53.  
  54. var
  55.   ProcessPrnMessage: function (var Msg: TMsg): Boolean;
  56.  
  57. implementation
  58.