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.

179 lines
4.5 KiB

  1. /*****************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 2000
  4. *
  5. * TITLE: precomp.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: RickTu
  10. *
  11. * DATE: 10/12/00
  12. *
  13. * DESCRIPTION: Precompiled header for photowiz dll
  14. *
  15. *****************************************************************************/
  16. #ifndef _PHOTOWIZ_PRECOMP_H_
  17. #define _PHOTOWIZ_PRECOMP_H_
  18. #include <nt.h>
  19. #include <ntrtl.h>
  20. #include <nturtl.h>
  21. #include <ntexapi.h>
  22. #include <windows.h>
  23. #include <commctrl.h>
  24. #include <commoncontrols.h>
  25. #include <objbase.h>
  26. #include <advpub.h>
  27. #include <shellapi.h>
  28. #include <shlobj.h>
  29. #include <shlwapi.h>
  30. #include <shlwapip.h>
  31. #include <shlobjp.h>
  32. #include <shlguidp.h>
  33. #include <commctrl.h>
  34. #include <comctrlp.h>
  35. #include <compstui.h>
  36. #include <winddiui.h>
  37. #include <winspool.h>
  38. #include <prsht.h>
  39. #include <shpriv.h>
  40. #include <shfusion.h>
  41. #include <atlbase.h>
  42. #include <msxml.h>
  43. #include <urlmon.h>
  44. #include <errno.h>
  45. #include <gdiplus.h>
  46. #include <gdiplusinit.h>
  47. #include <assert.h>
  48. // psutil stuff
  49. #include <psutil.h>
  50. #include <tmplutil.h>
  51. #include <wiadebug.h>
  52. #include <uicommon.h>
  53. #include <wiatextc.h>
  54. #include <wiadevdp.h>
  55. #include <annotlib.h>
  56. //
  57. // Trace mask fields
  58. //
  59. #define TRACE_CF 0x80000000
  60. #define TRACE_REF_COUNTS 0x40000000
  61. #define TRACE_UTIL 0x20000000
  62. #define TRACE_DLGPROC 0x10000000
  63. #define TRACE_WIZ_INFO_BLOB 0x08000000
  64. #define TRACE_IDLIST 0x04000000
  65. #define TRACE_XML 0x02000000
  66. #define TRACE_LIST_ITEM 0x01000000
  67. #define TRACE_PRINTTO 0x00800000
  68. #define TRACE_PREVIEW 0x00000800
  69. #define TRACE_PREVIEW_BITMAP 0x00000400
  70. #define TRACE_TEMPLATE 0x00000200
  71. #define TRACE_PAGE_END 0x00000100
  72. #define TRACE_PAGE_STATUS 0x00000080
  73. #define TRACE_PAGE_SEL_TEMPLATE 0x00000040
  74. #define TRACE_PAGE_PRINT_OPT 0x00000020
  75. #define TRACE_PAGE_PHOTO_SEL 0x00000010
  76. #define TRACE_PAGE_START 0x00000008
  77. #define TRACE_PHOTO_ITEM 0x00000004
  78. #define TRACE_WIZ 0x00000002
  79. #define TRACE_DROP 0x00000001
  80. #define RESOLVE_PRINTER_MACROS 1
  81. // from dll.cpp
  82. EXTERN_C HINSTANCE g_hInst;
  83. EXTERN_C ATOM g_cPreviewClassWnd;
  84. STDAPI_(void) DllAddRef(void);
  85. STDAPI_(void) DllRelease(void);
  86. HMODULE GetThreadHMODULE( LPTHREAD_START_ROUTINE pfnThreadProc );
  87. STDAPI PPWCoInitialize(void);
  88. #define PPWCoUninitialize(hr) if(SUCCEEDED(hr)){CoUninitialize();}
  89. //
  90. // Needs to be global
  91. //
  92. extern Gdiplus::Color g_wndColor;
  93. typedef struct {
  94. RECT rcDevice;
  95. BOOL bDeviceIsScreen;
  96. SIZE DPI;
  97. RECT rcNominalTemplatePrintArea;
  98. RECT rcNominalPageClip;
  99. SIZE NominalDevicePrintArea;
  100. SIZE NominalPageOffset;
  101. SIZE NominalPhysicalSize;
  102. SIZE NominalPhysicalOffset;
  103. } RENDER_DIMENSIONS, *LPRENDER_DIMENSIONS;
  104. #include "cfdefs.h"
  105. #include "prwiziid.h"
  106. #include "resource.h"
  107. #include "item.h"
  108. #include "listitem.h"
  109. #include "xmltools2.h"
  110. #include "preview.h"
  111. #include "status.h"
  112. #include "photosel.h" // photosel.h must come after item.h
  113. #include "wizblob.h" // wizblob.h must come after item.h, preview.h
  114. #include "printopt.h"
  115. #include "seltemp.h"
  116. #include "start.h"
  117. #include "end.h"
  118. #define SIZEOF sizeof
  119. #define MAX_WIZPAGES 6
  120. #define DEFAULT_THUMB_WIDTH 120
  121. #define DEFAULT_THUMB_HEIGHT 120
  122. //
  123. // Let's define some custom error codes so that we can give better error messages
  124. //
  125. #define FACILITY_PPW 0x777
  126. #define PPW_E_UNABLE_TO_ROTATE MAKE_HRESULT(SEVERITY_ERROR,FACILITY_PPW,0x1)
  127. // from drop.cpp
  128. STDAPI CPrintPhotosDropTarget_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  129. // from printwiz.cpp
  130. STDAPI CPrintPhotosWizard_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  131. // from ccstock.h in nt\shell\inc
  132. #ifdef __cplusplus
  133. #define IID_PPV_ARG(IType, ppType) IID_##IType, reinterpret_cast<void**>(static_cast<IType**>(ppType))
  134. #define IID_X_PPV_ARG(IType, X, ppType) IID_##IType, X, reinterpret_cast<void**>(static_cast<IType**>(ppType))
  135. #else
  136. #define IID_PPV_ARG(IType, ppType) &IID_##IType, (void**)(ppType)
  137. #define IID_X_PPV_ARG(IType, X, ppType) &IID_##IType, X, (void**)(ppType)
  138. #endif
  139. #define IID_PPV_ARG_NULL(IType, ppType) IID_X_PPV_ARG(IType, NULL, ppType)
  140. // from netwiz.h in nt\shell\ext\netplwiz
  141. typedef struct
  142. {
  143. LPCWSTR idPage;
  144. DLGPROC pDlgProc;
  145. LPCWSTR pHeading;
  146. LPCWSTR pSubHeading;
  147. DWORD dwFlags;
  148. } WIZPAGE;
  149. #endif // !_PHOTOWIZ_PRECOMP_H_