MsHtmHst.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:13k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+------------------------------------------------------------------------
  2. //
  3. //  Microsoft Forms
  4. //  Copyright (C) Microsoft Corporation, 1996-1998.
  5. //
  6. //  File:       mshtmhst.h
  7. //
  8. //  Contents:   MSHTML advanced host interfaces
  9. //
  10. //-------------------------------------------------------------------------
  11. cpp_quote("//=--------------------------------------------------------------------------=")
  12. cpp_quote("// mshtmhst.h")
  13. cpp_quote("//=--------------------------------------------------------------------------=")
  14. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation.  All Rights Reserved.")
  15. cpp_quote("//")
  16. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF")
  17. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  18. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  19. cpp_quote("// PARTICULAR PURPOSE.")
  20. cpp_quote("//=--------------------------------------------------------------------------=")
  21. cpp_quote("")
  22. cpp_quote("#pragma comment(lib,"uuid.lib")")
  23. cpp_quote("")
  24. cpp_quote("//--------------------------------------------------------------------------")
  25. cpp_quote("// MSTHML Advanced Host Interfaces.")
  26. cpp_quote("")
  27. cpp_quote("#ifndef MSHTMHST_H")
  28. cpp_quote("#define MSHTMHST_H")
  29. cpp_quote("#define CONTEXT_MENU_DEFAULT        0")
  30. cpp_quote("#define CONTEXT_MENU_IMAGE          1")
  31. cpp_quote("#define CONTEXT_MENU_CONTROL        2")
  32. cpp_quote("#define CONTEXT_MENU_TABLE          3")
  33. cpp_quote("// in browse mode")
  34. cpp_quote("#define CONTEXT_MENU_TEXTSELECT     4")
  35. cpp_quote("#define CONTEXT_MENU_ANCHOR         5")
  36. cpp_quote("#define CONTEXT_MENU_UNKNOWN        6")
  37. cpp_quote("//;begin_internal")
  38. cpp_quote("// These 2 are mapped to IMAGE for the public")
  39. cpp_quote("#define CONTEXT_MENU_IMGDYNSRC      7")
  40. cpp_quote("#define CONTEXT_MENU_IMGART         8")
  41. cpp_quote("#define CONTEXT_MENU_DEBUG          9")
  42. cpp_quote("//;end_internal")
  43. cpp_quote("#define CONTEXT_MENU_VSCROLL        10")
  44. cpp_quote("#define CONTEXT_MENU_HSCROLL        11")
  45. cpp_quote("#define MENUEXT_SHOWDIALOG           0x1")
  46. cpp_quote("#define DOCHOSTUIFLAG_BROWSER       DOCHOSTUIFLAG_DISABLE_HELP_MENU | DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE ")
  47. cpp_quote("#define HTMLDLG_NOUI                     0x10")
  48. cpp_quote("#define HTMLDLG_MODAL                    0x20")
  49. cpp_quote("#define HTMLDLG_MODELESS                 0x40")
  50. cpp_quote("#define HTMLDLG_PRINT_TEMPLATE           0x80")
  51. cpp_quote("#define HTMLDLG_VERIFY                   0x100")
  52. cpp_quote("#define PRINT_DONTBOTHERUSER             0x01")
  53. cpp_quote("#define PRINT_WAITFORCOMPLETION          0x02")
  54. import "ocidl.idl";
  55. import "objidl.idl";
  56. import "oleidl.idl";
  57. import "oaidl.idl";
  58. import "docobj.idl";
  59. cpp_quote("EXTERN_C const GUID CGID_MSHTML;")
  60. cpp_quote("#define CMDSETID_Forms3 CGID_MSHTML")
  61. cpp_quote("#define SZ_HTML_CLIENTSITE_OBJECTPARAM L"{d4db6850-5385-11d0-89e9-00a0c90a90ac}"")
  62. cpp_quote("#ifndef __IHTMLWindow2_FWD_DEFINED__")
  63. cpp_quote("#define __IHTMLWindow2_FWD_DEFINED__")
  64. cpp_quote("typedef interface IHTMLWindow2 IHTMLWindow2;")
  65. cpp_quote("#endif")
  66. #pragma midl_echo("typedef HRESULT STDAPICALLTYPE SHOWHTMLDIALOGFN (HWND hwndParent, IMoniker *pmk, VARIANT *pvarArgIn, WCHAR* pchOptions, VARIANT *pvArgOut);")
  67. #pragma midl_echo("typedef HRESULT STDAPICALLTYPE SHOWHTMLDIALOGEXFN (HWND hwndParent, IMoniker *pmk, DWORD dwDialogFlags, VARIANT *pvarArgIn, WCHAR* pchOptions, VARIANT *pvArgOut);")
  68. #pragma midl_echo("typedef HRESULT STDAPICALLTYPE SHOWMODELESSHTMLDIALOGFN (HWND hwndParent, IMoniker *pmk, VARIANT *pvarArgIn, VARIANT* pvarOptions, IHTMLWindow2 ** ppWindow);")
  69. cpp_quote("//;begin_internal")
  70. #pragma midl_echo("STDAPI ShowHTMLDialog(                   ")
  71. #pragma midl_echo("    HWND        hwndParent,              ")
  72. #pragma midl_echo("    IMoniker *  pMk,                     ")
  73. #pragma midl_echo("    VARIANT *   pvarArgIn,               ")
  74. #pragma midl_echo("    WCHAR *     pchOptions,              ")
  75. #pragma midl_echo("    VARIANT *   pvarArgOut               ")
  76. #pragma midl_echo("    );                                   ")
  77. #pragma midl_echo("STDAPI ShowHTMLDialogEx(                 ")
  78. #pragma midl_echo("    HWND        hwndParent,              ")
  79. #pragma midl_echo("    IMoniker *  pMk,                     ")
  80. #pragma midl_echo("    DWORD       dwDialogFlags,           ")
  81. #pragma midl_echo("    VARIANT *   pvarArgIn,               ")
  82. #pragma midl_echo("    WCHAR *     pchOptions,              ")
  83. #pragma midl_echo("    VARIANT *   pvarArgOut               ")
  84. #pragma midl_echo("    );                                   ")
  85. #pragma midl_echo("STDAPI ShowModelessHTMLDialog(           ")
  86. #pragma midl_echo("    HWND        hwndParent,              ")
  87. #pragma midl_echo("    IMoniker *  pMk,                     ")
  88. #pragma midl_echo("    VARIANT *   pvarArgIn,               ")
  89. #pragma midl_echo("    VARIANT *   pvarOptions,             ")
  90. #pragma midl_echo("    IHTMLWindow2 ** ppWindow);           ")
  91. cpp_quote("//;end_internal")
  92. cpp_quote("//;begin_internal")
  93. #pragma midl_echo("STDAPI RunHTMLApplication(               ")
  94. #pragma midl_echo("    HINSTANCE hinst,                     ")
  95. #pragma midl_echo("    HINSTANCE hPrevInst,                 ")
  96. #pragma midl_echo("    LPSTR szCmdLine,                     ")
  97. #pragma midl_echo("    int nCmdShow                         ")
  98. #pragma midl_echo("    );                                   ")
  99. cpp_quote("//;end_internal")
  100. cpp_quote("//;begin_internal")
  101. #pragma midl_echo("STDAPI CreateHTMLPropertyPage(           ")
  102. #pragma midl_echo("    IMoniker *          pmk,             ")        
  103. #pragma midl_echo("    IPropertyPage **    ppPP             ")
  104. #pragma midl_echo("    );                                   ")
  105. cpp_quote("//;end_internal")
  106. //-------------------------------------------------------------------------
  107. //  IHostDialogHelper
  108. //
  109. //-------------------------------------------------------------------------
  110. [
  111.         object,
  112.         uuid(53DEC138-A51E-11d2-861E-00C04FA35C89),
  113.         pointer_default(unique),
  114.         local
  115. ]
  116. interface IHostDialogHelper : IUnknown
  117. {
  118.     HRESULT ShowHTMLDialog(
  119.                 HWND hwndParent,
  120.                 IMoniker *pMk,
  121.                 VARIANT *pvarArgIn,
  122.                 WCHAR *pchOptions,
  123.                 VARIANT *pvarArgOut,
  124.                 IUnknown *punkHost
  125.                 );
  126. };
  127. [
  128.     uuid(429AF92C-A51F-11d2-861E-00C04FA35C89)
  129. ]
  130. coclass HostDialogHelper
  131. {
  132.     [default]           interface IHostDialogHelper;
  133. };
  134. cpp_quote("EXTERN_C const GUID CLSID_HostDialogHelper;")
  135. //-------------------------------------------------------------------------
  136. //  IDocHostUIHandler
  137. //
  138. //-------------------------------------------------------------------------
  139. cpp_quote("//;begin_internal")
  140. typedef
  141. enum tagDOCHOSTUITYPE {
  142.         DOCHOSTUITYPE_BROWSE    = 0,
  143.         DOCHOSTUITYPE_AUTHOR    = 1,
  144. } DOCHOSTUITYPE;
  145. cpp_quote("//;end_internal")
  146. typedef enum tagDOCHOSTUIDBLCLK {
  147.         DOCHOSTUIDBLCLK_DEFAULT         = 0,
  148.         DOCHOSTUIDBLCLK_SHOWPROPERTIES  = 1,
  149.         DOCHOSTUIDBLCLK_SHOWCODE        = 2,
  150. } DOCHOSTUIDBLCLK ;
  151. typedef enum tagDOCHOSTUIFLAG {
  152.         DOCHOSTUIFLAG_DIALOG                    = 0x00000001,
  153.         DOCHOSTUIFLAG_DISABLE_HELP_MENU         = 0x00000002,
  154.         DOCHOSTUIFLAG_NO3DBORDER                = 0x00000004,
  155.         DOCHOSTUIFLAG_SCROLL_NO                 = 0x00000008,
  156.         DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE   = 0x00000010,
  157.         DOCHOSTUIFLAG_OPENNEWWIN                = 0x00000020,
  158.         DOCHOSTUIFLAG_DISABLE_OFFSCREEN         = 0x00000040,
  159.         DOCHOSTUIFLAG_FLAT_SCROLLBAR            = 0x00000080,
  160.         DOCHOSTUIFLAG_DIV_BLOCKDEFAULT          = 0x00000100,
  161.         DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY   = 0x00000200,
  162.         DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY   = 0x00000400,
  163.         DOCHOSTUIFLAG_CODEPAGELINKEDFONTS       = 0x00000800,
  164.         DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x00001000,
  165.         DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8  = 0x00002000,
  166.         DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x00004000,
  167.         DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x00010000,
  168.         DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION   = 0x00020000, 
  169.         DOCHOSTUIFLAG_THEME                     = 0x00040000, 
  170.         DOCHOSTUIFLAG_NOTHEME                   = 0x00080000,
  171.         DOCHOSTUIFLAG_NOPICS                    = 0x00100000,
  172.         DOCHOSTUIFLAG_NO3DOUTERBORDER           = 0x00200000,
  173.         DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP     = 0x00400000,
  174. } DOCHOSTUIFLAG ;
  175. cpp_quote("#define DOCHOSTUIATOM_ENABLE_HIRES _T("TridentEnableHiRes")")
  176. [
  177.         object,
  178.         uuid(bd3f23c0-d43e-11cf-893b-00aa00bdce1a),
  179.         pointer_default(unique),
  180.         local
  181. ]
  182. interface IDocHostUIHandler : IUnknown
  183. {
  184.     typedef struct _DOCHOSTUIINFO
  185.     {
  186.         ULONG       cbSize;
  187.         DWORD       dwFlags;
  188.         DWORD       dwDoubleClick;
  189.         OLECHAR *   pchHostCss;
  190.         OLECHAR *   pchHostNS;
  191.     } DOCHOSTUIINFO;
  192.     HRESULT ShowContextMenu(
  193.             [in] DWORD dwID,
  194.             [in] POINT* ppt,
  195.             [in] IUnknown* pcmdtReserved,
  196.             [in] IDispatch* pdispReserved);
  197.     HRESULT GetHostInfo([in, out] DOCHOSTUIINFO * pInfo);
  198.     HRESULT ShowUI(
  199.             [in] DWORD dwID,
  200.             [in] IOleInPlaceActiveObject * pActiveObject,
  201.             [in] IOleCommandTarget * pCommandTarget,
  202.             [in] IOleInPlaceFrame * pFrame,
  203.             [in] IOleInPlaceUIWindow * pDoc);
  204.     HRESULT HideUI();
  205.     HRESULT UpdateUI();
  206.     HRESULT EnableModeless([in] BOOL fEnable);
  207.     HRESULT OnDocWindowActivate([in] BOOL fActivate);
  208.     HRESULT OnFrameWindowActivate([in] BOOL fActivate);
  209.     HRESULT ResizeBorder(
  210.             [in] LPCRECT prcBorder,
  211.             [in] IOleInPlaceUIWindow * pUIWindow,
  212.             [in] BOOL fRameWindow);
  213.     HRESULT TranslateAccelerator(
  214.             [in] LPMSG lpMsg,
  215.             [in] const GUID * pguidCmdGroup,
  216.             [in] DWORD nCmdID);
  217.     HRESULT GetOptionKeyPath([out] LPOLESTR * pchKey, [in] DWORD dw);
  218.     HRESULT GetDropTarget(
  219.             [in] IDropTarget * pDropTarget,
  220.             [out] IDropTarget ** ppDropTarget);
  221.     HRESULT GetExternal([out] IDispatch **ppDispatch);
  222.     HRESULT TranslateUrl([in]DWORD dwTranslate, [in]OLECHAR *pchURLIn, [out]OLECHAR **ppchURLOut);
  223.     HRESULT FilterDataObject([in]IDataObject *pDO, [out]IDataObject **ppDORet);
  224. }
  225. [
  226.         object,
  227.         uuid(3050f6d0-98b5-11cf-bb82-00aa00bdce0b),
  228.         pointer_default(unique),
  229.         local
  230. ]
  231. interface IDocHostUIHandler2 : IDocHostUIHandler
  232. {
  233.     HRESULT GetOverrideKeyPath([out] LPOLESTR * pchKey, [in] DWORD dw);
  234. }
  235. cpp_quote("DEFINE_GUID(CGID_DocHostCommandHandler,0xf38bc242,0xb950,0x11d1,0x89,0x18,0x00,0xc0,0x4f,0xc2,0xc8,0x36);")
  236. //-------------------------------------------------------------------------
  237. //  ICustomDoc
  238. //
  239. //-------------------------------------------------------------------------
  240. [
  241.         object,
  242.         uuid(3050f3f0-98b5-11cf-bb82-00aa00bdce0b),
  243.         pointer_default(unique),
  244.         local
  245. ]
  246. interface ICustomDoc : IUnknown
  247. {
  248.     HRESULT SetUIHandler(
  249.             [in] IDocHostUIHandler * pUIHandler);
  250. }
  251. //-------------------------------------------------------------------------
  252. //  IDocHostShowUI
  253. //
  254. //-------------------------------------------------------------------------
  255. [
  256.         object,
  257.         uuid(c4d244b0-d43e-11cf-893b-00aa00bdce1a),
  258.         pointer_default(unique),
  259.         local
  260. ]
  261. interface IDocHostShowUI : IUnknown
  262. {
  263.     HRESULT ShowMessage(
  264.             [in] HWND hwnd,
  265.             [in] LPOLESTR lpstrText,
  266.             [in] LPOLESTR lpstrCaption,
  267.             [in] DWORD dwType,
  268.             [in] LPOLESTR lpstrHelpFile,
  269.             [in] DWORD dwHelpContext,
  270.             [out] LRESULT * plResult);
  271.     HRESULT ShowHelp(
  272.             [in] HWND hwnd,
  273.             [in] LPOLESTR pszHelpFile,
  274.             [in] UINT uCommand,
  275.             [in] DWORD dwData,
  276.             [in] POINT ptMouse,
  277.             [out] IDispatch * pDispatchObjectHit);
  278. }
  279. cpp_quote("#define IClassFactory3      IClassFactoryEx")
  280. cpp_quote("#define IID_IClassFactory3  IID_IClassFactoryEx")
  281. //-------------------------------------------------------------------------
  282. //
  283. //  IClassFactoryEx
  284. //
  285. //-------------------------------------------------------------------------
  286. [
  287.         object,
  288.                 uuid(342D1EA0-AE25-11D1-89C5-006008C3FBFC),
  289.         pointer_default(unique),
  290.         local
  291. ]
  292. interface IClassFactoryEx : IClassFactory
  293. {
  294.         HRESULT CreateInstanceWithContext(IUnknown *punkContext, 
  295.                         IUnknown *punkOuter, REFIID riid, [out] void **ppv);
  296. };
  297. cpp_quote("#endif")