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.

317 lines
9.1 KiB

  1. /*****************************************************************************\
  2. FILE: priv.h
  3. DESCRIPTION:
  4. This is the precompiled header for themeui.dll.
  5. BryanSt 4/4/2000 (Bryan Starbuck)
  6. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  7. \*****************************************************************************/
  8. #ifndef _PRIV_H_
  9. #define _PRIV_H_
  10. /*****************************************************************************\
  11. Global Includes
  12. \*****************************************************************************/
  13. #define WIN32_LEAN_AND_MEAN
  14. #define NOIME
  15. #define NOSERVICE
  16. // This stuff must run on Win95
  17. #define _WIN32_WINDOWS 0x0400
  18. #ifndef WINVER
  19. #define WINVER 0x0400
  20. #endif // WINVER
  21. #define STRICT
  22. #ifndef _WIN32_WINNT
  23. #define _WIN32_WINNT 0x0400
  24. #endif
  25. #define _ATL_APARTMENT_THREADED
  26. #undef _ATL_DLL
  27. #undef _ATL_DLL_IMPL
  28. #include <atlbase.h>
  29. //You may derive a class from CComModule and use it if you want to override
  30. //something, but do not change the name of _Module
  31. extern CComModule _Module;
  32. #include <atlcom.h>
  33. #include <atlctl.h>
  34. #define _OLEAUT32_ // get DECLSPEC_IMPORT stuff right, we are defing these
  35. #define _FSMENU_ // for DECLSPEC_IMPORT
  36. #define _WINMM_ // for DECLSPEC_IMPORT in mmsystem.h
  37. #define _SHDOCVW_ // for DECLSPEC_IMPORT in shlobj.h
  38. #define _WINX32_ // get DECLSPEC_IMPORT stuff right for WININET API
  39. #define _URLCACHEAPI_ // get DECLSPEC_IMPORT stuff right for wininet urlcache
  40. #define POST_IE5_BETA
  41. #include <w95wraps.h>
  42. #include <windows.h>
  43. #include <windowsx.h>
  44. #include "resource.h"
  45. #define _FIX_ENABLEMODELESS_CONFLICT // for shlobj.h
  46. //WinInet need to be included BEFORE ShlObjp.h
  47. #include <wininet.h>
  48. #include <urlmon.h>
  49. #include <shlobj.h>
  50. #include <exdisp.h>
  51. #include <objidl.h>
  52. #include <shellids.h> // Help IDs
  53. #include <shlwapi.h>
  54. #include <shlwapip.h>
  55. // HACKHACK: For the life of me, I can't get shlwapip.h to include the diffinitions of these.
  56. // I'm giving up and putting them inline. __IOleAutomationTypes_INTERFACE_DEFINED__ and
  57. // __IOleCommandTarget_INTERFACE_DEFINED__ need to be defined, which requires oaidl.h,
  58. // which requires hlink.h which requires rpcndr.h to come in the right order. Once I got that
  59. // far I found it still didn't work and a lot of more stuff is needed. The problem
  60. // is that shlwapi (exdisp/dspsprt/expdsprt/cnctnpt) or ATL will provide impls for
  61. // IConnectionPoint & IConnectionPointContainer, but one will conflict with the other.
  62. LWSTDAPI IConnectionPoint_SimpleInvoke(IConnectionPoint *pcp, DISPID dispidMember, DISPPARAMS * pdispparams);
  63. LWSTDAPI IConnectionPoint_OnChanged(IConnectionPoint *pcp, DISPID dispid);
  64. LWSTDAPIV IUnknown_CPContainerInvokeParam(IUnknown *punk, REFIID riidCP, DISPID dispidMember, VARIANTARG *rgvarg, UINT cArgs, ...);
  65. #include <shellapi.h>
  66. #include <shsemip.h>
  67. #include <crtfree.h>
  68. #include <ole2ver.h>
  69. #include <olectl.h>
  70. #include <shellp.h>
  71. #include <shdocvw.h>
  72. #include <commdlg.h>
  73. #include <shguidp.h>
  74. #include <isguids.h>
  75. #include <shdguid.h>
  76. #include <mimeinfo.h>
  77. #include <hlguids.h>
  78. #include <mshtmdid.h>
  79. #include <msident.h>
  80. #include <msxml.h>
  81. #include <Theme.h> // For ITheme interfaces
  82. #include <dispex.h> // IDispatchEx
  83. #include <perhist.h>
  84. #include <regapix.h>
  85. #include <shsemip.h>
  86. #include <help.h>
  87. #include <krnlcmn.h> // GetProcessDword
  88. #define DISALLOW_Assert // Force to use ASSERT instead of Assert
  89. #define DISALLOW_DebugMsg // Force to use TraceMsg instead of DebugMsg
  90. #include <debug.h>
  91. #include <urlhist.h>
  92. #include <regstr.h> // for REGSTR_PATH_EXPLORE
  93. #define USE_SYSTEM_URL_MONIKER
  94. #include <urlmon.h>
  95. //#include <winineti.h> // Cache APIs & structures
  96. #include <inetreg.h>
  97. #define _INTSHCUT_ // get DECLSPEC_IMPORT stuff right for INTSHCUT.h
  98. #include <intshcut.h>
  99. #include <propset.h> // BUGBUG (scotth): remove this once OLE adds an official header
  100. #define HLINK_NO_GUIDS
  101. #include <hlink.h>
  102. #include <hliface.h>
  103. #include <docobj.h>
  104. #include <ccstock.h>
  105. #include <port32.h>
  106. #include <commctrl.h>
  107. #include <shpriv.h>
  108. #include <Prsht.h>
  109. // Include the automation definitions...
  110. #include <exdisp.h>
  111. #include <exdispid.h>
  112. #include <ocmm.h>
  113. #include <mshtmhst.h>
  114. #include <simpdata.h>
  115. #include <htiface.h>
  116. #include <objsafe.h>
  117. #include <dspsprt.h>
  118. #include <cowsite.h>
  119. #include <cobjsafe.h>
  120. #include <objclsid.h>
  121. #include <objwindow.h>
  122. #include <autosecurity.h>
  123. #include <guids.h>
  124. #include <tmschema.h>
  125. #include <uxtheme.h>
  126. #include <uxthemep.h>
  127. // Trace flags
  128. #define TF_WMTHEME 0x00000100 // Themes
  129. /*****************************************************************************\
  130. *
  131. * Global Helper Macros/Typedefs
  132. *
  133. \*****************************************************************************/
  134. EXTERN_C HINSTANCE g_hinst; // My instance handle
  135. #define HINST_THISDLL g_hinst
  136. #define WizardNext(hwnd, to) SetWindowLongPtr(hwnd, DWLP_MSGRESULT, (LPARAM)to)
  137. //
  138. // we may not be part of the namespace on IE3/Win95
  139. //
  140. typedef BOOL (WINAPI *PFNILISEQUAL)(LPCITEMIDLIST, LPCITEMIDLIST);
  141. STDAPI_(void) DllAddRef(void);
  142. STDAPI_(void) DllRelease(void);
  143. #define CALLWNDPROC WNDPROC
  144. #include "idispids.h"
  145. #define MAX_PAGES 100
  146. /*****************************************************************************\
  147. *
  148. * Static globals: Initialized at PROCESS_ATTACH and never modified.
  149. *
  150. * WARNING! <shelldll\idlcomm.h> #define's various g_cf's, so we need
  151. * to #undef them before we start partying on them again.
  152. *
  153. \*****************************************************************************/
  154. // Detect "." or ".." as invalid files
  155. #define IS_VALID_FILE(str) (!(('.' == str[0]) && (('\0' == str[1]) || (('.' == str[1]) && ('\0' == str[2])))))
  156. /*****************************************************************************\
  157. *
  158. * Global state management.
  159. *
  160. * DLL reference count, DLL critical section.
  161. *
  162. \*****************************************************************************/
  163. void DllAddRef(void);
  164. void DllRelease(void);
  165. #define NULL_FOR_EMPTYSTR(str) (((str) && (str)[0]) ? str : NULL)
  166. typedef void (*LISTPROC)(UINT flm, LPVOID pv);
  167. #define RECTWIDTH(rc) ((rc).right - (rc).left)
  168. #define RECTHEIGHT(rc) ((rc).bottom - (rc).top)
  169. /*****************************************************************************\
  170. * Local Includes
  171. \*****************************************************************************/
  172. typedef unsigned __int64 QWORD, * LPQWORD;
  173. void GetCfBufA(UINT cf, PSTR psz, int cch);
  174. // This is defined in WININET.CPP
  175. typedef LPVOID HINTERNET;
  176. typedef HGLOBAL HIDA;
  177. #define QW_MAC 0xFFFFFFFFFFFFFFFF
  178. #define INTERNET_MAX_PATH_LENGTH 2048
  179. #define INTERNET_MAX_SCHEME_LENGTH 32 // longest protocol name length
  180. #define MAX_URL_STRING (INTERNET_MAX_SCHEME_LENGTH \
  181. + sizeof("://") \
  182. + INTERNET_MAX_PATH_LENGTH)
  183. #define MAX_EMAIL_ADDRESSS MAX_URL_STRING
  184. #define SZ_EMPTY TEXT("")
  185. // Features (This is where they are turned on and off)
  186. // With this feature on, we demote the advanced appearances
  187. // options into an "Advanced" subdialog.
  188. #define FEATURE_DEMOTE_ADVANCED_APPEAROPTIONS
  189. // String Constants
  190. // Registry
  191. #define SZ_WINDOWMETRICS TEXT("Control Panel\\Desktop\\WindowMetrics")
  192. #define SZ_APPLIEDDPI TEXT("AppliedDPI")
  193. // PropertyBag Propertyes
  194. #define SZ_PBPROP_APPLY_THEMEFILE TEXT("Theme_ApplySettings") // When this is sent to a CThemeFile object, it will apply the settings that haven't been pulled out of it and placed in other Display Control Panel tabs.
  195. #define SZ_PBPROP_THEME_FILTER TEXT("ThemeFilter:") // The filter values of what parts of themes to apply.
  196. #define SZ_PBPROP_THEME_DISPLAYNAME TEXT("Theme_DisplayName") // Get the Theme display name for the currently selected item.
  197. #define SIZE_THEME_FILTER_STR (ARRAYSIZE(SZ_PBPROP_THEME_FILTER) - 1)
  198. // Parsing Characters
  199. #define CH_ADDRESS_SEPARATOR L';'
  200. #define CH_ADDRESS_QUOTES L'"'
  201. #define CH_EMAIL_START L'<'
  202. #define CH_EMAIL_END L'>'
  203. #define CH_EMAIL_AT L'@'
  204. #define CH_EMAIL_DOMAIN_SEPARATOR L'.'
  205. #define CH_HTML_ESCAPE L'%'
  206. #define CH_COMMA L','
  207. #define COLLECTION_SIZE_UNINITIALIZED -1
  208. /*****************************************************************************\
  209. * Local Includes
  210. \*****************************************************************************/
  211. #include "dllload.h"
  212. #include "util.h"
  213. /*****************************************************************************\
  214. Object Constructors
  215. \*****************************************************************************/
  216. HRESULT CClassFactory_Create(REFCLSID rclsid, REFIID riid, LPVOID * ppvObj);
  217. HRESULT CThemeUIPages_CreateInstance(IN IUnknown * punkOuter, IN REFIID riid, OUT LPVOID * ppvObj);
  218. #endif // _PRIV_H_