forked from Tobbe/CppIEEmbed
-
Notifications
You must be signed in to change notification settings - Fork 2
/
tdochostuihandler.cpp
107 lines (88 loc) · 2.84 KB
/
tdochostuihandler.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#include "tdochostuihandler.h"
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::ShowContextMenu(DWORD dwID,
POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::GetHostInfo(DOCHOSTUIINFO *pInfo)
{
// Called at initialization of the browser object UI. We can set various
// features of the browser object here.
// We can do disable the 3D border (DOCHOSTUIFLAG_NO3DOUTERBORDER) and
// other things like hide the scroll bar (DOCHOSTUIFLAG_SCROLL_NO), display
// picture display (DOCHOSTUIFLAG_NOPICS), disable any script running when
// the page is loaded (DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE), open a site
// in a new browser window when the user clicks on some link
// (DOCHOSTUIFLAG_OPENNEWWIN), and lots of other things. See the MSDN docs
// on the DOCHOSTUIINFO struct passed to us.
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::ShowUI(DWORD dwID,
IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget,
IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::HideUI()
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::UpdateUI()
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::EnableModeless(BOOL fEnable)
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::OnDocWindowActivate(BOOL fActivate)
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::OnFrameWindowActivate(
BOOL fActivate)
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::ResizeBorder(LPCRECT prcBorder,
IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
{
return S_OK;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::TranslateAccelerator(LPMSG lpMsg,
const GUID *pguidCmdGroup, DWORD nCmdID)
{
return S_FALSE;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::GetOptionKeyPath(LPOLESTR *pchKey,
DWORD dw)
{
return S_FALSE;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::GetDropTarget(
IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
{
return S_FALSE;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::GetExternal(IDispatch **ppDispatch)
{
// Gets the host's IDispatch interface.
// If the host exposes an automation interface, it can provide a reference
// to MSHTML through ppDispatch.
// If the method implementation does not supply an IDispatch, set
// ppDispatch to NULL, even if the method fails or returns S_FALSE.
*ppDispatch = NULL;
return S_FALSE;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::TranslateUrl(DWORD dwTranslate,
OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
{
*ppchURLOut = 0;
return S_FALSE;
}
HRESULT STDMETHODCALLTYPE TDocHostUIHandler::FilterDataObject(IDataObject *pDO,
IDataObject **ppDORet)
{
*ppDORet = 0;
return S_FALSE;
}