1 // SOActiveX.h : Declaration of the CSOActiveX
6 #include "resource.h" // main symbols
8 #pragma warning (disable:4505)
9 // permanently suppress "unreferenced local function has been removed" warning
11 #pragma warning (push,1)
12 #pragma warning (disable:4265)
18 #if defined(_MSC_VER) && (_MSC_VER >= 1300)
23 #include "so_activex.h"
27 class SODispatchInterceptor
;
40 /////////////////////////////////////////////////////////////////////////////
42 class ATL_NO_VTABLE CSOActiveX
:
43 public CComObjectRootEx
<CComSingleThreadModel
>,
44 public IDispatchImpl
<ISOActiveX
, &IID_ISOActiveX
, &LIBID_SO_ACTIVEXLib
>,
45 public CComControl
<CSOActiveX
>,
46 public IPersistStreamInitImpl
<CSOActiveX
>,
47 public IOleControlImpl
<CSOActiveX
>,
48 public IOleObjectImpl
<CSOActiveX
>,
49 public IOleInPlaceActiveObjectImpl
<CSOActiveX
>,
50 public IViewObjectExImpl
<CSOActiveX
>,
51 public IOleInPlaceObjectWindowlessImpl
<CSOActiveX
>,
52 // public IConnectionPointContainerImpl<CSOActiveX>,
53 public CComCoClass
<CSOActiveX
, &CLSID_SOActiveX
>,
54 // public CProxy_ItryPluginEvents< CSOActiveX >,
55 public IPersistPropertyBagImpl
< CSOActiveX
>,
56 public IProvideClassInfo2Impl
< &CLSID_SOActiveX
,
57 &DIID__ISOActiveXEvents
,
58 &LIBID_SO_ACTIVEXLib
>,
59 public IObjectSafetyImpl
< CSOActiveX
,
60 INTERFACESAFE_FOR_UNTRUSTED_DATA
>
63 CComPtr
<IWebBrowser2
> mWebBrowser2
;
66 CComPtr
<IDispatch
> mpDispFactory
;
67 CComPtr
<IDispatch
> mpDispFrame
;
68 CComPtr
<IDispatch
> mpInstanceLocker
;
69 CComPtr
<IDispatch
> mpDispWin
;
77 SODispatchInterceptor
* mpDispatchInterceptor
;
80 BOOL mbReadyForActivation
;
81 CComPtr
<IDispatch
> mpDispTempFile
;
89 DECLARE_REGISTRY_RESOURCEID(IDR_SOACTIVEX
)
91 DECLARE_PROTECT_FINAL_CONSTRUCT()
93 BEGIN_COM_MAP(CSOActiveX
)
94 COM_INTERFACE_ENTRY(ISOActiveX
)
95 COM_INTERFACE_ENTRY(IDispatch
)
96 COM_INTERFACE_ENTRY(IViewObjectEx
)
97 COM_INTERFACE_ENTRY(IViewObject2
)
98 COM_INTERFACE_ENTRY(IViewObject
)
99 COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless
)
100 COM_INTERFACE_ENTRY(IOleInPlaceObject
)
101 COM_INTERFACE_ENTRY2(IOleWindow
, IOleInPlaceObjectWindowless
)
102 COM_INTERFACE_ENTRY(IOleInPlaceActiveObject
)
103 COM_INTERFACE_ENTRY(IOleControl
)
104 COM_INTERFACE_ENTRY(IOleObject
)
105 COM_INTERFACE_ENTRY(IPersistStreamInit
)
106 COM_INTERFACE_ENTRY2(IPersist
, IPersistStreamInit
)
107 // COM_INTERFACE_ENTRY(IConnectionPointContainer)
108 COM_INTERFACE_ENTRY(IProvideClassInfo
)
109 COM_INTERFACE_ENTRY(IProvideClassInfo2
)
110 COM_INTERFACE_ENTRY(IPersistPropertyBag
)
111 COM_INTERFACE_ENTRY(IObjectSafety
)
114 BEGIN_PROP_MAP(CSOActiveX
)
115 PROP_DATA_ENTRY("_cx", m_sizeExtent
.cx
, VT_UI4
)
116 PROP_DATA_ENTRY("_cy", m_sizeExtent
.cy
, VT_UI4
)
118 // PROP_ENTRY("Property Description", dispid, clsid)
119 // PROP_PAGE(CLSID_StockColorPage)
122 BEGIN_CONNECTION_POINT_MAP(CSOActiveX
)
123 END_CONNECTION_POINT_MAP()
125 BEGIN_MSG_MAP(CSOActiveX
)
126 CHAIN_MSG_MAP(CComControl
<CSOActiveX
>)
127 DEFAULT_REFLECTION_HANDLER()
129 // Handler prototypes:
130 // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
131 // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
132 // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
137 DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND
| VIEWSTATUS_OPAQUE
)
142 STDMETHOD(SetClientSite
)( IOleClientSite
* aClientSite
);
143 STDMETHOD(Invoke
)( DISPID dispidMember
,
147 DISPPARAMS
* pDispParams
,
149 EXCEPINFO
* pExcepInfo
,
151 STDMETHOD(Load
) ( LPPROPERTYBAG pPropBag
, LPERRORLOG pErrorLog
);
152 STDMETHOD(Load
) ( LPSTREAM pStm
);
153 STDMETHOD(InitNew
) ();
154 HRESULT
OnDrawAdvanced(ATL_DRAWINFO
& di
);
155 HRESULT
OnDraw(ATL_DRAWINFO
& di
);
157 HRESULT
SetLayoutManagerProps();
158 HRESULT
CreateFrameOldWay( HWND hwnd
, int width
, int height
);
159 HRESULT
GetUnoStruct( OLECHAR
* sStructName
, CComPtr
<IDispatch
>& pdispResult
);
160 HRESULT
LoadURLToFrame();
161 HRESULT
CallDispatchMethod( OLECHAR
* sUrl
, CComVariant
* sArgNames
, CComVariant
* sArgVal
, unsigned int count
);
162 HRESULT
CallLoadComponentFromURL1PBool( OLECHAR
* sUrl
, OLECHAR
* sArgName
, BOOL sArgVal
);
163 HRESULT
GetUrlStruct( OLECHAR
* sUrl
, CComPtr
<IDispatch
>& pdispUrl
);
165 HRESULT
TerminateOffice();
166 HRESULT
GetURL( const OLECHAR
* url
,
167 const OLECHAR
* target
);
169 void CallbackCreateXInputStream( CBindStatusCallback
<CSOActiveX
>* pbsc
, BYTE
* pBytes
, DWORD dwSize
);
172 SOVersion
GetVersionConnected();
175 #endif //__SOACTIVEX_H_