home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / TemaCD / devc / _SETUP.5 / Group3 / oleidl.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  10KB  |  306 lines

  1. #ifndef _OLEIDL_H
  2. #define _OLEIDL_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. #include <objfwd.h>
  9. typedef interface IParseDisplayname *LPPARSEDISPLAYNAME;
  10. typedef interface IOleContainer *LPOLECONTAINER;
  11. typedef interface IOleClientSite *LPOLECLIENTSITE;
  12. typedef interface IOleObject *LPOLEOBJECT;
  13. typedef interface IDropTarget *LPDROPTARGET;
  14. typedef interface IDropSource *LPDROPSOURCE;
  15. typedef interface IEnumOleDocumentViews *LPENUMOLEDOCUMENTVIEWS;
  16. typedef interface IEnumOleUndoUnits *LPENUMOLEUNDOUNITS;
  17. typedef interface IEnumOLEVERB *LPENUMOLEVERB;
  18. typedef interface IOleWindow *LPOLEWINDOW;
  19. typedef interface IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
  20. typedef interface IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
  21. typedef interface IOleInPlaceFrame *LPOLEINPLACEFRAME;
  22. typedef interface IOleAdviseHolder *LPOLEADVISEHOLDER;
  23. typedef interface IViewObject *LPVIEWOBJECT;
  24. typedef interface IViewObject2 *LPVIEWOBJECT2;
  25.  
  26. typedef enum tagOLEWHICHMK {
  27.     OLEWHICHMK_CONTAINER=1,
  28.     OLEWHICHMK_OBJREL,
  29.     OLEWHICHMK_OBJFULL
  30. } OLEWHICHMK;
  31. typedef enum tagOLEGETMONIKER {
  32.     OLEGETMONIKER_ONLYIFTHERE=1,
  33.     OLEGETMONIKER_FORCEASSIGN,
  34.     OLEGETMONIKER_UNASSIGN,
  35.     OLEGETMONIKER_TEMPFORUSER
  36. } OLEGETMONIKER;
  37. typedef enum tagDROPEFFECT {
  38.     DROPEFFECT_NONE=0,
  39.     DROPEFFECT_COPY=1,
  40.     DROPEFFECT_MOVE=2,
  41.     DROPEFFECT_LINK=4,
  42.     DROPEFFECT_SCROLL=0x80000000
  43. } DROPEFFECT;
  44. typedef struct tagOleMenuGroupWidths {
  45.     LONG width[6];
  46. } OLEMENUGROUPWIDTHS,*LPOLEMENUGROUPWIDTHS;
  47. typedef HGLOBAL HOLEMENU;
  48. typedef enum tagOLECLOSE {
  49.     OLECLOSE_SAVEIFDIRTY,
  50.     OLECLOSE_NOSAVE,
  51.     OLECLOSE_PROMPTSAVE
  52. } OLECLOSE;
  53. typedef struct tagOLEVERB {
  54.     LONG lVerb;
  55.     LPWSTR lpszVerbName;
  56.     DWORD fuFlags;
  57.     DWORD grfAttribs;
  58. } OLEVERB,*LPOLEVERB;
  59. typedef RECT BORDERWIDTHS;
  60. typedef LPRECT LPBORDERWIDTHS;
  61. typedef LPCRECT LPCBORDERWIDTHS;
  62. typedef struct tagOIFI {
  63.     UINT cb;
  64.     BOOL fMDIApp;
  65.     HWND hwndFrame;
  66.     HACCEL haccel;
  67.     UINT cAccelEntries;
  68. }OLEINPLACEFRAMEINFO,*LPOLEINPLACEFRAMEINFO;
  69.  
  70. /*DECLARE_ENUMERATOR_(IEnumOleDocumentViews,IOleDocumentView);*/
  71. DECLARE_ENUMERATOR(OLEVERB);
  72. typedef IEnumOLEVERB IEnumOleVerb;
  73.  
  74. #undef INTERFACE
  75. #define INTERFACE IParseDisplayName
  76. DECLARE_INTERFACE_(IParseDisplayName,IUnknown)
  77. {
  78.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  79.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  80.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  81.     STDMETHOD(ParseDisplayName)(THIS_ IBindCtx*,LPOLESTR,ULONG*,IMoniker**) PURE;
  82. };
  83.  
  84. #undef INTERFACE
  85. #define INTERFACE IOleContainer
  86. DECLARE_INTERFACE_(IOleContainer,IParseDisplayName)
  87. {
  88.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  89.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  90.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  91.     STDMETHOD(ParseDisplayName)(THIS_ IBindCtx*,LPOLESTR,ULONG*,IMoniker**) PURE;
  92.     STDMETHOD(EnumObjects)(THIS_ DWORD,IEnumUnknown**) PURE;
  93.     STDMETHOD(LockContainer)(THIS_ BOOL) PURE;
  94. };
  95.  
  96. #undef INTERFACE
  97. #define INTERFACE IOleClientSite
  98. DECLARE_INTERFACE_(IOleClientSite,IUnknown)
  99. {
  100.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  101.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  102.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  103.     STDMETHOD(SaveObject)(THIS) PURE;
  104.     STDMETHOD(GetMoniker)(THIS_ DWORD,DWORD,LPMONIKER*) PURE;
  105.     STDMETHOD(GetContainer)(THIS_ LPOLECONTAINER*) PURE;
  106.     STDMETHOD(ShowObject)(THIS) PURE;
  107.     STDMETHOD(OnShowWindow)(THIS_ BOOL) PURE;
  108.     STDMETHOD(RequestNewObjectLayout)(THIS) PURE;
  109. };
  110.  
  111. #undef INTERFACE
  112. #define INTERFACE IOleObject
  113. DECLARE_INTERFACE_(IOleObject,IUnknown)
  114. {
  115.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  116.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  117.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  118.     STDMETHOD(SetClientSite)(THIS_ LPOLECLIENTSITE) PURE;
  119.     STDMETHOD(GetClientSite)(THIS_ LPOLECLIENTSITE*) PURE;
  120.     STDMETHOD(SetHostNames)(THIS_ LPCOLESTR,LPCOLESTR) PURE;
  121.     STDMETHOD(Close)(THIS_ DWORD) PURE;
  122.     STDMETHOD(SetMoniker)(THIS_ DWORD,LPMONIKER) PURE;
  123.     STDMETHOD(GetMoniker)(THIS_ DWORD,DWORD,LPMONIKER*) PURE;
  124.     STDMETHOD(InitFromData)(THIS_ LPDATAOBJECT,BOOL,DWORD) PURE;
  125.     STDMETHOD(GetClipboardData)(THIS_ DWORD,LPDATAOBJECT*) PURE;
  126.     STDMETHOD(DoVerb)(THIS_ LONG,LPMSG,LPOLECLIENTSITE,LONG,HWND,LPCRECT) PURE;
  127.     STDMETHOD(EnumVerbs)(THIS_ LPENUMOLEVERB*) PURE;
  128.     STDMETHOD(Update)(THIS) PURE;
  129.     STDMETHOD(IsUpToDate)(THIS) PURE;
  130.     STDMETHOD(GetUserClassID)(THIS_ LPCLSID) PURE;
  131.     STDMETHOD(GetUserType)(THIS_ DWORD,LPOLESTR) PURE;
  132.     STDMETHOD(SetExtent)(THIS_ DWORD,SIZEL*) PURE;
  133.     STDMETHOD(GetExtent)(THIS_ DWORD,SIZEL*) PURE;
  134.     STDMETHOD(Advise)(THIS_ LPADVISESINK,PDWORD) PURE;
  135.     STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
  136.     STDMETHOD(EnumAdvise)(THIS_ LPENUMSTATDATA*) PURE;
  137.     STDMETHOD(GetMiscStatus)(THIS_ DWORD,PDWORD) PURE;
  138.     STDMETHOD(SetColorScheme)(THIS_ LPLOGPALETTE) PURE;
  139. };
  140.  
  141. #undef INTERFACE
  142. #define INTERFACE IOleWindow
  143. DECLARE_INTERFACE_(IOleWindow,IUnknown)
  144. {
  145.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  146.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  147.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  148.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  149.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  150. };
  151.  
  152. #undef INTERFACE
  153. #define INTERFACE IOleInPlaceUIWindow
  154. DECLARE_INTERFACE_(IOleInPlaceUIWindow,IOleWindow)
  155. {
  156.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  157.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  158.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  159.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  160.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  161.     STDMETHOD(GetBorder)(THIS_ LPRECT) PURE;
  162.     STDMETHOD(RequestBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
  163.     STDMETHOD(SetBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
  164.     STDMETHOD(SetActiveObject)(THIS_ LPOLEINPLACEACTIVEOBJECT,LPCOLESTR) PURE;
  165. };
  166.  
  167. #undef INTERFACE
  168. #define INTERFACE IOleInPlaceActiveObject
  169. DECLARE_INTERFACE_(IOleInPlaceActiveObject,IOleWindow)
  170. {
  171.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  172.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  173.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  174.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  175.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  176.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
  177.     STDMETHOD(OnFrameWindowActivate)(THIS_ BOOL) PURE;
  178.     STDMETHOD(OnDocWindowActivate)(THIS_ BOOL) PURE;
  179.     STDMETHOD(ResizeBorder)(THIS_ LPCRECT,LPOLEINPLACEUIWINDOW,BOOL) PURE;
  180.     STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
  181. };
  182.  
  183. #undef INTERFACE
  184. #define INTERFACE IOleInPlaceFrame
  185. DECLARE_INTERFACE_(IOleInPlaceFrame,IOleInPlaceUIWindow)
  186. {
  187.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  188.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  189.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  190.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  191.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  192.     STDMETHOD(GetBorder)(THIS_ LPRECT) PURE;
  193.     STDMETHOD(RequestBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
  194.     STDMETHOD(SetBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
  195.     STDMETHOD(SetActiveObject)(THIS_ LPOLEINPLACEACTIVEOBJECT,LPCOLESTR) PURE;
  196.     STDMETHOD(InsertMenus)(THIS_ HMENU,LPOLEMENUGROUPWIDTHS) PURE;
  197.     STDMETHOD(SetMenu)(THIS_ HMENU,HOLEMENU,HWND) PURE;
  198.     STDMETHOD(RemoveMenus)(THIS_ HMENU) PURE;
  199.     STDMETHOD(SetStatusText)(THIS_ LPCOLESTR) PURE;
  200.     STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
  201.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG,WORD) PURE;
  202. };
  203.  
  204. #undef INTERFACE
  205. #define INTERFACE IOleAdviseHolder
  206. DECLARE_INTERFACE_(IOleAdviseHolder,IUnknown)
  207. {
  208.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  209.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  210.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  211.     STDMETHOD(Advise)(THIS_ LPADVISESINK,PDWORD) PURE;
  212.     STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
  213.     STDMETHOD(EnumAdvise)(THIS_ LPENUMSTATDATA*) PURE;
  214.     STDMETHOD(SendOnRename)(THIS_ LPMONIKER) PURE;
  215.     STDMETHOD(SendOnSave)(THIS) PURE;
  216.     STDMETHOD(SendOnClose)(THIS) PURE;
  217. };
  218.  
  219. #undef INTERFACE
  220. #define INTERFACE IDropSource
  221. DECLARE_INTERFACE_(IDropSource,IUnknown)
  222. {
  223.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  224.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  225.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  226.     STDMETHOD(QueryContinueDrag)(THIS_ BOOL,DWORD) PURE;
  227.     STDMETHOD(GiveFeedback)(THIS_ DWORD);
  228. };
  229.  
  230. #undef INTERFACE
  231. #define INTERFACE IDropTarget
  232. DECLARE_INTERFACE_(IDropTarget,IUnknown)
  233. {
  234.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  235.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  236.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  237.     STDMETHOD(DragEnter)(THIS_ LPDATAOBJECT,DWORD,POINTL,PDWORD) PURE;
  238.     STDMETHOD(DragOver)(THIS_ DWORD,POINTL,PDWORD) PURE;
  239.     STDMETHOD(DragLeave)(THIS) PURE;
  240.     STDMETHOD(Drop)(THIS_ LPDATAOBJECT,DWORD,POINTL,PDWORD) PURE;
  241. };
  242.  
  243. typedef BOOL(CALLBACK *__IView_pfncont)(DWORD);
  244. #undef INTERFACE
  245. #define INTERFACE IViewObject
  246. DECLARE_INTERFACE_(IViewObject,IUnknown)
  247. {
  248.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  249.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  250.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  251.     STDMETHOD(Draw)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,__IView_pfncont pfnContinue,DWORD) PURE;
  252.     STDMETHOD(GetColorSet)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,LPLOGPALETTE*) PURE;
  253.     STDMETHOD(Freeze)(THIS_ DWORD,LONG,PVOID,PDWORD) PURE;
  254.     STDMETHOD(Unfreeze)(THIS_ DWORD);
  255.     STDMETHOD(SetAdvise)(THIS_ DWORD,DWORD,IAdviseSink*) PURE;
  256.     STDMETHOD(GetAdvise)(THIS_ PDWORD,PDWORD,IAdviseSink**) PURE;
  257. };
  258.  
  259. #undef INTERFACE
  260. #define INTERFACE IViewObject2
  261. DECLARE_INTERFACE_(IViewObject2,IUnknown)
  262. {
  263.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  264.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  265.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  266.     STDMETHOD(Draw)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,__IView_pfncont pfnContinue,DWORD) PURE;
  267.     STDMETHOD(GetColorSet)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,LPLOGPALETTE*) PURE;
  268.     STDMETHOD(Freeze)(THIS_ DWORD,LONG,PVOID,PDWORD) PURE;
  269.     STDMETHOD(Unfreeze)(THIS_ DWORD);
  270.     STDMETHOD(SetAdvise)(THIS_ DWORD,DWORD,IAdviseSink*) PURE;
  271.     STDMETHOD(GetAdvise)(THIS_ PDWORD,PDWORD,IAdviseSink**) PURE;
  272.     STDMETHOD(GetExtent)(THIS_ DWORD,DWORD,DVTARGETDEVICE*,LPSIZEL) PURE;
  273. };
  274.  
  275. #undef INTERFACE
  276. #define INTERFACE ISupportErrorInfo
  277. DECLARE_INTERFACE_(ISupportErrorInfo, IUnknown)
  278. {
  279.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  280.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  281.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  282.     STDMETHOD(InterfaceSupportsErrorInfo)(THIS_ REFIID) PURE;
  283.  
  284. };
  285.  
  286. #undef INTERFACE
  287. #define INTERFACE IErrorInfo
  288. DECLARE_INTERFACE_(IErrorInfo, IUnknown)
  289. {
  290.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  291.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  292.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  293.  
  294.     STDMETHOD(GetGUID)(THIS_ REFIID) PURE;
  295.     STDMETHOD(GetSource)(THIS_ BSTR*) PURE;
  296.     STDMETHOD(GetDescription)(THIS_ BSTR*) PURE;
  297.     STDMETHOD(GetHelpContext)(THIS_ DWORD*) PURE;
  298.  
  299.  };
  300.  
  301. #ifdef __cplusplus
  302. }
  303. #endif
  304. #endif
  305.  
  306.