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.

164 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. prtcovpg.h
  5. Abstract:
  6. This module contains the WIN32 Fax API header
  7. for the Windows XP FaxCover rendering routine.
  8. Author:
  9. Julia Robinson (a-juliar) 5-20-96
  10. Revision History:
  11. Julia Robinson (a-juliar) 6-7-76
  12. Julia Robinson (a-juliar) 9-20-96 Allow passing paper size and orientation.
  13. --*/
  14. #ifndef __PRTCOVPG_H__
  15. #define __PRTCOVPG_H__
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. //
  20. // Structure of the composite file header
  21. //
  22. typedef struct {
  23. BYTE Signature[20];
  24. DWORD EmfSize;
  25. DWORD NbrOfTextRecords;
  26. SIZE CoverPageSize;
  27. } COMPOSITEFILEHEADER;
  28. //
  29. // Structure of the text box entries appended to
  30. // the composite file
  31. //
  32. typedef struct {
  33. RECT PositionOfTextBox;
  34. COLORREF TextColor;
  35. LONG TextAlignment;
  36. LOGFONTW FontDefinition;
  37. WORD ResourceID ;
  38. DWORD NumStringBytes; // Variable length string will follow this structure
  39. } TEXTBOX;
  40. //
  41. // Structure of user data for text insertions
  42. //
  43. typedef struct _COVERPAGEFIELDS {
  44. //
  45. // Recipient stuff...
  46. //
  47. DWORD ThisStructSize;
  48. LPTSTR RecName;
  49. LPTSTR RecFaxNumber;
  50. LPTSTR RecCompany;
  51. LPTSTR RecStreetAddress;
  52. LPTSTR RecCity;
  53. LPTSTR RecState;
  54. LPTSTR RecZip;
  55. LPTSTR RecCountry;
  56. LPTSTR RecTitle;
  57. LPTSTR RecDepartment;
  58. LPTSTR RecOfficeLocation;
  59. LPTSTR RecHomePhone;
  60. LPTSTR RecOfficePhone;
  61. //
  62. // Senders stuff...
  63. //
  64. LPTSTR SdrName;
  65. LPTSTR SdrFaxNumber;
  66. LPTSTR SdrCompany;
  67. LPTSTR SdrAddress;
  68. LPTSTR SdrTitle;
  69. LPTSTR SdrDepartment;
  70. LPTSTR SdrOfficeLocation;
  71. LPTSTR SdrHomePhone;
  72. LPTSTR SdrOfficePhone;
  73. LPTSTR SdrEmail;
  74. //
  75. // Misc Stuff...
  76. //
  77. LPTSTR Note;
  78. LPTSTR Subject;
  79. LPTSTR TimeSent;
  80. LPTSTR NumberOfPages;
  81. LPTSTR ToList;
  82. LPTSTR CCList ;
  83. } COVERPAGEFIELDS, *PCOVERPAGEFIELDS;
  84. #define NUM_INSERTION_TAGS ((sizeof(COVERPAGEFIELDS) - sizeof(DWORD)) / sizeof(LPTSTR))
  85. //
  86. // pFlags fields: bit 0 is Recipient Name, bit 1 is Recipient Fax Number, et cetera.
  87. //
  88. #define COVFP_NOTE 0x00800000
  89. #define COVFP_SUBJECT 0x01000000
  90. #define COVFP_NUMPAGES 0x04000000
  91. typedef struct _COVDOCINFO {
  92. DWORD Flags ;
  93. RECT NoteRect ;
  94. short Orientation ;
  95. short PaperSize ;
  96. LOGFONT NoteFont ;
  97. } COVDOCINFO, *PCOVDOCINFO ;
  98. //
  99. // Function prototypes
  100. //
  101. DWORD WINAPI
  102. PrintCoverPage(
  103. HDC hDC,
  104. PCOVERPAGEFIELDS pUserData,
  105. LPCTSTR lpctstrTemplateFileName,
  106. PCOVDOCINFO pCovDocInfo
  107. );
  108. DWORD
  109. WINAPI
  110. RenderCoverPage(
  111. HDC hdc,
  112. LPCRECT lpcRect,
  113. PCOVERPAGEFIELDS pUserData,
  114. LPCTSTR lpctstrTemplateFileName,
  115. PCOVDOCINFO pCovDocInfo,
  116. BOOL bPreview
  117. );
  118. DWORD
  119. PrintCoverPageToFile(
  120. LPTSTR lptstrCoverPage,
  121. LPTSTR lptstrTargetFile,
  122. LPTSTR lptstrPrinterName,
  123. short sCPOrientation,
  124. short sCPYResolution,
  125. PCOVERPAGEFIELDS pCPFields);
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #endif