1 // SOComWindowPeer.h: Definition of the SOComWindowPeer class
3 //////////////////////////////////////////////////////////////////////
5 #if !defined __SOCOMWINDOWPEER_H_
6 #define __SOCOMWINDOWPEER_H_
10 #endif // _MSC_VER > 1000
12 #include "resource.h" // main symbols
17 #if defined(_MSC_VER) && (_MSC_VER >= 1300)
22 #include "so_activex.h"
24 /////////////////////////////////////////////////////////////////////////////
27 class SOComWindowPeer
:
28 public IDispatchImpl
<ISOComWindowPeer
, &IID_ISOComWindowPeer
, &LIBID_SO_ACTIVEXLib
>,
29 public ISupportErrorInfo
,
30 public CComObjectRoot
,
31 public CComCoClass
<SOComWindowPeer
,&CLSID_SOComWindowPeer
>
35 SOComWindowPeer() : m_hwnd( NULL
) {}
36 virtual ~SOComWindowPeer() { }
38 BEGIN_COM_MAP(SOComWindowPeer
)
39 COM_INTERFACE_ENTRY(IDispatch
)
40 COM_INTERFACE_ENTRY(ISOComWindowPeer
)
41 COM_INTERFACE_ENTRY(ISupportErrorInfo
)
43 DECLARE_NOT_AGGREGATABLE(SOComWindowPeer
)
44 // Remove the comment from the line above if you don't want your object to
45 // support aggregation.
47 DECLARE_REGISTRY_RESOURCEID(IDR_SOCOMWINDOWPEER
)
50 STDMETHOD(InterfaceSupportsErrorInfo
)(REFIID riid
);
53 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
getWindowHandle(
54 /* [in] */ SAFEARRAY __RPC_FAR
* /*procId*/,
55 /* [in] */ short /*s*/,
56 /* [retval][out] */ long __RPC_FAR
*ret
)
62 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
getToolkit(
63 /* [retval][out] */ IDispatch __RPC_FAR
*__RPC_FAR
*retVal
)
69 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
setPointer(
70 /* [in] */ IDispatch __RPC_FAR
* /*xPointer*/)
75 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
setBackground(
76 /* [in] */ int /*nColor*/)
81 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
invalidate(
82 /* [in] */ short /*__MIDL_0015*/)
87 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
invalidateRect(
88 /* [in] */ IDispatch __RPC_FAR
* /*aRect*/,
89 /* [in] */ short /*nFlags*/)
94 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
dispose( void)
99 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
addEventListener(
100 /* [in] */ IDispatch __RPC_FAR
* /*xListener*/)
105 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
removeEventListener(
106 /* [in] */ IDispatch __RPC_FAR
* /*xListener*/)
111 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Bridge_implementedInterfaces(
112 /* [retval][out] */ SAFEARRAY __RPC_FAR
* __RPC_FAR
*pVal
)
114 *pVal
= SafeArrayCreateVector( VT_BSTR
, 0, 2 );
120 CComBSTR
aInterface( OLESTR( "com.sun.star.awt.XSystemDependentWindowPeer" ) );
121 SafeArrayPutElement( *pVal
, &ix
, aInterface
);
124 aInterface
= CComBSTR( OLESTR( "com.sun.star.awt.XWindowPeer" ) );
125 SafeArrayPutElement( *pVal
, &ix
, aInterface
);
130 void SetHWNDInternally( HWND hwnd
) { m_hwnd
= hwnd
; }
133 #endif // __SOCOMWINDOWPEER_H_