Source code of Windows XP (NT5)
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.

312 lines
5.5 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1996 - 1999
  3. All rights reserved.
  4. Module Name:
  5. prtprops.hxx
  6. Abstract:
  7. Printer Property sheet header.
  8. Author:
  9. Steve Kiraly (SteveKi) 02-Feb-1996
  10. Revision History:
  11. --*/
  12. #ifndef _PRTPROPS_HXX
  13. #define _PRTPROPS_HXX
  14. //
  15. // HACK: private export from winspool.drv.
  16. //
  17. extern "C" {
  18. LONG_PTR
  19. DevicePropertySheets(
  20. PPROPSHEETUI_INFO pPSUIInfo,
  21. LPARAM lParam
  22. );
  23. }
  24. //
  25. // HACK: private export from shell32.dll
  26. //
  27. extern "C" {
  28. VOID
  29. Printer_AddPrinterPropPages(
  30. LPCTSTR,
  31. LPPROPSHEETHEADER
  32. );
  33. }
  34. /********************************************************************
  35. Shell extenstion pages.
  36. ********************************************************************/
  37. class TShellExtPages {
  38. SIGNATURE( 'shex' )
  39. SAFE_NEW
  40. ALWAYS_VALID
  41. public:
  42. TShellExtPages::
  43. TShellExtPages(
  44. VOID
  45. );
  46. TShellExtPages::
  47. ~TShellExtPages(
  48. VOID
  49. );
  50. BOOL
  51. TShellExtPages::
  52. bCreate(
  53. IN PPROPSHEETUI_INFO pCPSUIInfo,
  54. IN const TString &strPrinterName
  55. );
  56. VOID
  57. TShellExtPages::
  58. vDestroy(
  59. IN PPROPSHEETUI_INFO pCPSUIInfo
  60. );
  61. HANDLE
  62. TShellExtPages::
  63. hPropSheet(
  64. VOID
  65. ) const;
  66. BOOL
  67. TShellExtPages::
  68. bCreatePropSheetHeader(
  69. IN LPPROPSHEETHEADER *pPropSheetHeader
  70. );
  71. VOID
  72. TShellExtPages::
  73. vDestroyPropSheetHeader(
  74. IN LPPROPSHEETHEADER pPropSheetHeader
  75. );
  76. private:
  77. BOOL
  78. TShellExtPages::
  79. bCreatePages(
  80. IN PPROPSHEETUI_INFO pCPSUIInfo,
  81. IN LPPROPSHEETHEADER pPropSheetHeader
  82. );
  83. VOID
  84. TShellExtPages::
  85. vDestroyPages(
  86. IN PPROPSHEETUI_INFO pCPSUIInfo
  87. );
  88. //
  89. // Prevent copying.
  90. //
  91. TShellExtPages::
  92. TShellExtPages(
  93. const TShellExtPages &
  94. );
  95. //
  96. // Prevent assignment.
  97. //
  98. TShellExtPages &
  99. TShellExtPages::
  100. operator =(
  101. const TShellExtPages &
  102. );
  103. private:
  104. LONG_PTR _hGroupHandle; // Handle to group of shell extension property pages
  105. };
  106. /********************************************************************
  107. Printer Property Sheet Manager
  108. ********************************************************************/
  109. class TPrinterPropertySheetManager : public TPropertySheetManager {
  110. SIGNATURE( 'psmg' )
  111. SAFE_NEW
  112. public:
  113. TPrinterPropertySheetManager::
  114. TPrinterPropertySheetManager(
  115. IN TPrinterData* pPrinterData
  116. );
  117. TPrinterPropertySheetManager::
  118. ~TPrinterPropertySheetManager(
  119. );
  120. BOOL
  121. TPrinterPropertySheetManager::
  122. bValid(
  123. VOID
  124. );
  125. BOOL
  126. TPrinterPropertySheetManager::
  127. bRefreshDriverPages(
  128. VOID
  129. );
  130. BOOL
  131. TPrinterPropertySheetManager::
  132. bCreateTitle(
  133. VOID
  134. );
  135. VOID
  136. TPrinterPropertySheetManager::
  137. vRefreshTitle(
  138. VOID
  139. );
  140. BOOL
  141. TPrinterPropertySheetManager::
  142. bDisplayPages(
  143. VOID
  144. );
  145. BOOL
  146. TPrinterPropertySheetManager::
  147. bGetDriverPageHandle(
  148. IN HPROPSHEETPAGE *phPage
  149. );
  150. BOOL
  151. TPrinterPropertySheetManager::
  152. bGetDriverPageHandles(
  153. IN PPROPSHEETUI_INFO pCPSUIInfo,
  154. OUT DWORD *pcPages,
  155. OUT HPROPSHEETPAGE **pphPage
  156. );
  157. VOID
  158. TPrinterPropertySheetManager::
  159. vSetParentHandle(
  160. IN HWND hwndParent
  161. );
  162. HWND
  163. TPrinterPropertySheetManager::
  164. hGetParentHandle(
  165. VOID
  166. ) const;
  167. private:
  168. enum
  169. {
  170. kMaxGroups = 3,
  171. };
  172. virtual
  173. BOOL
  174. TPrinterPropertySheetManager::
  175. bBuildPages(
  176. IN PPROPSHEETUI_INFO pCPSUIInfo
  177. );
  178. virtual
  179. BOOL
  180. TPrinterPropertySheetManager::
  181. bDestroyPages(
  182. IN PPROPSHEETUI_INFO pCPSUIInfo
  183. );
  184. virtual
  185. BOOL
  186. TPrinterPropertySheetManager::
  187. bSetHeader(
  188. IN PPROPSHEETUI_INFO pCPSUIInfo,
  189. IN PPROPSHEETUI_INFO_HEADER pPSUInfoHeader
  190. );
  191. BOOL
  192. TPrinterPropertySheetManager::
  193. bBuildDriverPages(
  194. IN PPROPSHEETUI_INFO pCPSUIInfo
  195. );
  196. BOOL
  197. TPrinterPropertySheetManager::
  198. bCheckToBuildDriverPages(
  199. IN PPROPSHEETUI_INFO pCPSUIInfo
  200. );
  201. VOID
  202. TPrinterPropertySheetManager::
  203. vReleaseDriverPages(
  204. IN PPROPSHEETUI_INFO pCPSUIInfo
  205. );
  206. BOOL
  207. TPrinterPropertySheetManager::
  208. bBuildSpoolerPages(
  209. IN PPROPSHEETUI_INFO pCPSUIInfo
  210. );
  211. BOOL
  212. TPrinterPropertySheetManager::
  213. bInstallDriverPage(
  214. VOID
  215. );
  216. BOOL
  217. TPrinterPropertySheetManager::
  218. bDisplaySecurityTab(
  219. IN HWND hwnd
  220. );
  221. //
  222. // Prevent copying.
  223. //
  224. TPrinterPropertySheetManager::
  225. TPrinterPropertySheetManager(
  226. const TPrinterPropertySheetManager &
  227. );
  228. //
  229. // Prevent assignment.
  230. //
  231. TPrinterPropertySheetManager &
  232. TPrinterPropertySheetManager::
  233. operator =(
  234. const TPrinterPropertySheetManager &
  235. );
  236. private:
  237. BOOL _bValid;
  238. LONG_PTR _hDrvPropSheet;
  239. DEVICEPROPERTYHEADER _dph;
  240. TPrinterData *_pPrinterData;
  241. TPrinterGeneral _General;
  242. TPrinterPorts _Ports;
  243. TPrinterJobScheduling _JobScheduling;
  244. TPrinterSharing _Sharing;
  245. TShellExtPages _ShellExtPages;
  246. TString _strTitle;
  247. HWND _hwndParent;
  248. };
  249. #endif // _PRTPROPS_HXX