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.

186 lines
6.8 KiB

  1. #ifndef SHFUSION_H
  2. #define SHFUSION_H
  3. #include <winbase.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. extern HANDLE g_hActCtx; // Global app context for this DLL.
  8. #define SHFUSION_DEFAULT_RESOURCE_ID ( 123 )
  9. #define SHFUSION_CPL_RESOURCE_ID ( 124 )
  10. // These are only needed for the callers, not the implementation
  11. // define SHFUSION_NO_API_REDEFINE to prevent this API redefinition
  12. #if !defined(SHFUSION_IMPL) && !defined(SHFUSION_NO_API_REDEFINE)
  13. // The following require app contexts
  14. //#undef LoadLibrary
  15. #undef CreateWindow
  16. #undef CreateWindowEx
  17. #undef CreateDialogParam
  18. #undef CreateDialogIndirectParam
  19. #undef DialogBoxParam
  20. #undef DialogBoxIndirectParam
  21. //#undef GetClassInfo
  22. //#undef GetClassInfoEx
  23. //#define LoadLibrary SHFusionLoadLibrary
  24. #define CreateWindow SHFusionCreateWindow
  25. #define CreateWindowEx SHFusionCreateWindowEx
  26. #define CreateDialogParam SHFusionCreateDialogParam
  27. #define CreateDialogIndirectParam SHFusionCreateDialogIndirectParam
  28. #define DialogBoxParam SHFusionDialogBoxParam
  29. #define DialogBoxIndirectParam SHFusionDialogBoxIndirectParam
  30. //#define GetClassInfo SHFusionGetClassInfo
  31. //#define GetClassInfoEx SHFusionGetClassInfoEx
  32. #endif
  33. void __stdcall SHGetManifest(PTSTR pszManifest, int cch);
  34. BOOL __stdcall SHFusionInitialize(PTSTR pszPath);
  35. BOOL __stdcall SHFusionInitializeFromModule(HMODULE hMod);
  36. BOOL __stdcall SHFusionInitializeFromModuleID(HMODULE hMod, int id);
  37. void __stdcall SHFusionUninitialize();
  38. BOOL __stdcall SHActivateContext(ULONG_PTR * pdwCookie);
  39. void __stdcall SHDeactivateContext(ULONG_PTR dwCookie);
  40. BOOL __stdcall NT5_ActivateActCtx(HANDLE h, ULONG_PTR * p);
  41. BOOL __stdcall NT5_DeactivateActCtx(ULONG_PTR p);
  42. // This is designed for Callers that know that they are creating a property
  43. // sheet on behalf of another that may be using an old version of common controls
  44. // PROPSHEETPAGE is designed so that it can contain extra information, so we can't
  45. // just wax part of the data structure for fusion use.
  46. HPROPSHEETPAGE __stdcall SHNoFusionCreatePropertySheetPageW (LPCPROPSHEETPAGEW a);
  47. HPROPSHEETPAGE __stdcall SHNoFusionCreatePropertySheetPageA (LPCPROPSHEETPAGEA a);
  48. STDAPI __stdcall SHSquirtManifest(HINSTANCE hInst, UINT uIdManifest, LPTSTR pszPath);
  49. HMODULE __stdcall SHFusionLoadLibrary(LPCTSTR lpLibFileName);
  50. HWND __stdcall SHFusionCreateWindow(
  51. LPCTSTR lpClassName, // registered class name
  52. LPCTSTR lpWindowName, // window name
  53. DWORD dwStyle, // window style
  54. int x, // horizontal position of window
  55. int y, // vertical position of window
  56. int nWidth, // window width
  57. int nHeight, // window height
  58. HWND hWndParent, // handle to parent or owner window
  59. HMENU hMenu, // menu handle or child identifier
  60. HINSTANCE hInstance, // handle to application instance
  61. LPVOID lpParam // window-creation data
  62. );
  63. // NOTE: There are times when we don't want to use the manifest for creating a window.
  64. // The #1 case is creating the host for MSHTML. Since MSHTML is a host of ActiveX controls,
  65. // the window manager will keep enabling fusion.
  66. HWND __stdcall SHNoFusionCreateWindowEx(
  67. DWORD dwExStyle, // extended window style
  68. LPCTSTR lpClassName, // registered class name
  69. LPCTSTR lpWindowName, // window name
  70. DWORD dwStyle, // window style
  71. int x, // horizontal position of window
  72. int y, // vertical position of window
  73. int nWidth, // window width
  74. int nHeight, // window height
  75. HWND hWndParent, // handle to parent or owner window
  76. HMENU hMenu, // menu handle or child identifier
  77. HINSTANCE hInstance, // handle to application instance
  78. LPVOID lpParam // window-creation data
  79. );
  80. HWND __stdcall SHFusionCreateWindowEx(
  81. DWORD dwExStyle, // extended window style
  82. LPCTSTR lpClassName, // registered class name
  83. LPCTSTR lpWindowName, // window name
  84. DWORD dwStyle, // window style
  85. int x, // horizontal position of window
  86. int y, // vertical position of window
  87. int nWidth, // window width
  88. int nHeight, // window height
  89. HWND hWndParent, // handle to parent or owner window
  90. HMENU hMenu, // menu handle or child identifier
  91. HINSTANCE hInstance, // handle to application instance
  92. LPVOID lpParam // window-creation data
  93. );
  94. HWND __stdcall SHFusionCreateDialogIndirect(
  95. HINSTANCE hInstance, // handle to module
  96. LPCDLGTEMPLATE lpTemplate, // dialog box template
  97. HWND hWndParent, // handle to owner window
  98. DLGPROC lpDialogFunc // dialog box procedure
  99. );
  100. HWND __stdcall SHFusionCreateDialogParam(
  101. HINSTANCE hInstance, // handle to module
  102. LPCTSTR lpTemplateName, // dialog box template
  103. HWND hWndParent, // handle to owner window
  104. DLGPROC lpDialogFunc, // dialog box procedure
  105. LPARAM dwInitParam // initialization value
  106. );
  107. HWND __stdcall SHFusionCreateDialogIndirectParam(
  108. HINSTANCE hInstance, // handle to module
  109. LPCDLGTEMPLATE lpTemplate, // dialog box template
  110. HWND hWndParent, // handle to owner window
  111. DLGPROC lpDialogFunc, // dialog box procedure
  112. LPARAM lParamInit // initialization value
  113. );
  114. HWND __stdcall SHNoFusionCreateDialogIndirectParam(
  115. HINSTANCE hInstance, // handle to module
  116. LPCDLGTEMPLATE lpTemplate, // dialog box template
  117. HWND hWndParent, // handle to owner window
  118. DLGPROC lpDialogFunc, // dialog box procedure
  119. LPARAM lParamInit // initialization value
  120. );
  121. INT_PTR __stdcall SHFusionDialogBoxIndirectParam(
  122. HINSTANCE hInstance, // handle to module
  123. LPCDLGTEMPLATE hDialogTemplate, // dialog box template
  124. HWND hWndParent, // handle to owner window
  125. DLGPROC lpDialogFunc, // dialog box procedure
  126. LPARAM dwInitParam // initialization value
  127. );
  128. INT_PTR __stdcall SHFusionDialogBoxParam(
  129. HINSTANCE hInstance, // handle to module
  130. LPCTSTR lpTemplateName, // dialog box template
  131. HWND hWndParent, // handle to owner window
  132. DLGPROC lpDialogFunc, // dialog box procedure
  133. LPARAM dwInitParam // initialization value
  134. );
  135. ATOM __stdcall SHFusionRegisterClass(
  136. CONST WNDCLASS *lpWndClass // class data
  137. );
  138. ATOM __stdcall SHFusionRegisterClassEx(
  139. CONST WNDCLASSEX *lpwcx // class data
  140. );
  141. BOOL __stdcall SHFusionGetClassInfo(
  142. HINSTANCE hInstance, // handle to application instance
  143. LPCTSTR lpClassName, // class name
  144. LPWNDCLASS lpWndClass // class data
  145. );
  146. BOOL __stdcall SHFusionGetClassInfoEx(
  147. HINSTANCE hinst, // handle to application instance
  148. LPCTSTR lpszClass, // class name
  149. LPWNDCLASSEX lpwcx // class data
  150. );
  151. #ifdef __cplusplus
  152. }
  153. #endif
  154. #endif