Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.5 KiB

  1. /* File: D:\WACKER\tdll\print.hh (Created: 19-Jan-1994)
  2. *
  3. * Copyright 1994 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 2 $
  7. * $Date: 7/08/02 6:45p $
  8. */
  9. #define PRINTSET_LOCAL 0x0001 // The printer is attached locally.
  10. #define PRINTSET_SHARED 0x0002 // The printer is shared (networked).
  11. #define MAX_NUM_PRINT_DC 5 // Max number of slots in print
  12. // control table.
  13. typedef struct stPrintPrivate *HHPRINT;
  14. struct stPrintPrivate
  15. {
  16. HSESSION hSession;
  17. CRITICAL_SECTION csPrint; // For snychronizing access.
  18. PDEVMODE pstDevMode; // Information from setup dialogs.
  19. // The printer name is contained
  20. // within the DEVMODE information.
  21. LPDEVNAMES pstDevNames; // Information from setup dialogs.
  22. // See printsetSetup for details
  23. // on usage of DEVNAMES.
  24. TCHAR *pszPrinterPortName, // The name of the printer port.
  25. *pszPrinterDriver,
  26. achDoc[80],
  27. achPrintToFileName[FNAME_LEN],
  28. achPrinterName[PRINTER_NAME_LEN];
  29. ECHAR achPrnEchoLine[256]; // For session file use only.
  30. DWORD nSelectionFlags,
  31. fLocation;
  32. HDC hDC;
  33. DOCINFO di;
  34. HFONT hFont;
  35. LOGFONT lf;
  36. TEXTMETRIC tm;
  37. RECT margins; // Margins in inches for the page setup dialog
  38. RECT marginsDC; // Margins in pixels for the current printer
  39. int iFontPointSize;
  40. long tmHeight;
  41. int nLinesPrinted, // running count of lines printed (per page)
  42. nPage, // current page number being printed
  43. nLinesPerPage, // calculated in PrintMemoryBlock
  44. nLnIdx,
  45. nFlags,
  46. nStatus,
  47. cx, cy, // position to print from.
  48. fUserAbort,
  49. fError,
  50. nPrnMethod, // PRNECHO_BY_PAGE || PRNECHO_BY_JOB
  51. nPrnMode; // PRNECHO_CHARS || PRNECHO_LINES || PRNECHO_SCREENS
  52. DLGPROC lpfnPrintDlgProc;
  53. ABORTPROC lpfnPrintAbortProc;
  54. HWND hwndPrintDlg;
  55. };
  56. // From print.c
  57. int printString(const HHPRINT hhPrint, LPCTSTR pachStr, int iLen);
  58. BOOL CALLBACK printAbortProc(HDC hDC, int nCode);
  59. BOOL printSetFont(const HHPRINT hhPrint);
  60. void printQueryPrinterInfo(const HHPRINT hhSessPrint, HHPRINT hhPrint );
  61. void printCreatePointFont(LOGFONT * pLogFont, HHPRINT hhPrint);
  62. void printSetMargins( HHPRINT hhPrint );
  63. // From printdc.c
  64. HDC printCtrlCreateDC(const HPRINT hPrint);
  65. void printCtrlDeleteDC(const HPRINT hPrint);
  66. HPRINT printCtrlLookupDC(const HDC hDC);
  67. int printOpenDC(const HHPRINT hhPrint);