ReactOS 0.4.15-dev-8102-g108db8f
OleInPlaceClient Struct Reference

#include <webchild.h>

Inheritance diagram for OleInPlaceClient:
Collaboration diagram for OleInPlaceClient:

Public Member Functions

 OleInPlaceClient (HWND hwnd=0)
 
void attach (HWND hwnd)
 
HRESULT attach_control (IOleObject *ole_obj, LONG iVerb=OLEIVERB_INPLACEACTIVATE, HWND hwndParent=0, LPCRECT pRect=NULL)
 
HRESULT detach (IOleObject *ole_obj, DWORD dwSaveOption=OLECLOSE_SAVEIFDIRTY)
 
STDMETHODIMP QueryInterface (REFIID riid, LPVOID *ppv)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND __RPC_FAR *phwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE SaveObject ()
 
virtual HRESULT STDMETHODCALLTYPE GetMoniker (DWORD dwAssign, DWORD dwWhichMoniker, IMoniker __RPC_FAR *__RPC_FAR *ppmk)
 
virtual HRESULT STDMETHODCALLTYPE GetContainer (IOleContainer __RPC_FAR *__RPC_FAR *ppContainer)
 
virtual HRESULT STDMETHODCALLTYPE ShowObject ()
 
virtual HRESULT STDMETHODCALLTYPE OnShowWindow (BOOL fShow)
 
virtual HRESULT STDMETHODCALLTYPE RequestNewObjectLayout ()
 
virtual HRESULT STDMETHODCALLTYPE CanInPlaceActivate ()
 
virtual HRESULT STDMETHODCALLTYPE OnInPlaceActivate ()
 
virtual HRESULT STDMETHODCALLTYPE OnUIActivate ()
 
virtual HRESULT STDMETHODCALLTYPE GetWindowContext (IOleInPlaceFrame __RPC_FAR *__RPC_FAR *ppFrame, IOleInPlaceUIWindow __RPC_FAR *__RPC_FAR *ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 
virtual HRESULT STDMETHODCALLTYPE Scroll (SIZE scrollExtant)
 
virtual HRESULT STDMETHODCALLTYPE OnUIDeactivate (BOOL fUndoable)
 
virtual HRESULT STDMETHODCALLTYPE OnInPlaceDeactivate ()
 
virtual HRESULT STDMETHODCALLTYPE DiscardUndoState ()
 
virtual HRESULT STDMETHODCALLTYPE DeactivateAndUndo ()
 
virtual HRESULT STDMETHODCALLTYPE OnPosRectChange (LPCRECT lprcPosRect)
 
- Public Member Functions inherited from SimpleComObject
ULONG IncRef ()
 
ULONG DecRef ()
 
- Public Member Functions inherited from IOleClientSite
HRESULT SaveObject ()
 
HRESULT GetMoniker ([in] DWORD dwAssign, [in] DWORD dwWhichMoniker, [out] IMoniker **ppmk)
 
HRESULT GetContainer ([out] IOleContainer **ppContainer)
 
HRESULT ShowObject ()
 
HRESULT OnShowWindow ([in] BOOL fShow)
 
HRESULT RequestNewObjectLayout ()
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IOleInPlaceSite
HRESULT CanInPlaceActivate ()
 
HRESULT OnInPlaceActivate ()
 
HRESULT OnUIActivate ()
 
HRESULT GetWindowContext ([out] IOleInPlaceFrame **ppFrame, [out] IOleInPlaceUIWindow **ppDoc, [out] LPRECT lprcPosRect, [out] LPRECT lprcClipRect, [in, out] LPOLEINPLACEFRAMEINFO lpFrameInfo)
 
HRESULT Scroll ([in] SIZE scrollExtent)
 
HRESULT OnUIDeactivate ([in] BOOL fUndoable)
 
HRESULT OnInPlaceDeactivate ()
 
HRESULT DiscardUndoState ()
 
HRESULT DeactivateAndUndo ()
 
HRESULT OnPosRectChange ([in] LPCRECT lprcPosRect)
 
- Public Member Functions inherited from IOleWindow
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 

Protected Attributes

HWND _hwnd
 
- Protected Attributes inherited from ComSrvObject
ULONG _ref
 

Additional Inherited Members

- Public Types inherited from IOleClientSite
typedef IOleClientSiteLPOLECLIENTSITE
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IOleInPlaceSite
typedef IOleInPlaceSiteLPOLEINPLACESITE
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Protected Member Functions inherited from ComSrvObject
 ComSrvObject ()
 
virtual ~ComSrvObject ()
 

Detailed Description

Definition at line 141 of file webchild.h.

Constructor & Destructor Documentation

◆ OleInPlaceClient()

OleInPlaceClient::OleInPlaceClient ( HWND  hwnd = 0)
inline

Definition at line 149 of file webchild.h.

150 : _hwnd(hwnd)
151 {
152 }
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Member Function Documentation

◆ attach()

void OleInPlaceClient::attach ( HWND  hwnd)
inline

Definition at line 154 of file webchild.h.

155 {
156 _hwnd = hwnd;
157 }

Referenced by IPCtrlWindow< BASE, SMARTPTR >::create_control().

◆ attach_control()

HRESULT OleInPlaceClient::attach_control ( IOleObject ole_obj,
LONG  iVerb = OLEIVERB_INPLACEACTIVATE,
HWND  hwndParent = 0,
LPCRECT  pRect = NULL 
)
inline

Definition at line 159 of file webchild.h.

160 {
161 HRESULT hr = ole_obj->SetClientSite(this);
162 if (FAILED(hr))
163 return hr;
164
165// hr = ole_obj->SetHostNames(app, doc));
166
167 hr = ole_obj->DoVerb(iVerb, NULL, this, 0, 0/*hwnd*/, NULL/*&rcPos*/);
168
169 return hr;
170 }
#define NULL
Definition: types.h:112
HRESULT SetClientSite([in, unique] IOleClientSite *pClientSite)
HRESULT DoVerb([in] LONG iVerb, [in, unique] LPMSG lpmsg, [in, unique] IOleClientSite *pActiveSite, [in] LONG lindex, [in] HWND hwndParent, [in, unique] LPCRECT lprcPosRect)
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hr
Definition: shlfolder.c:183

Referenced by IPCtrlWindow< BASE, SMARTPTR >::create_control().

◆ CanInPlaceActivate()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::CanInPlaceActivate ( )
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 249 of file webchild.h.

250 {
251 return S_OK;
252 }
#define S_OK
Definition: intsafe.h:52

◆ ContextSensitiveHelp()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::ContextSensitiveHelp ( BOOL  fEnterMode)
inlinevirtual

Implements IOleWindow.

Definition at line 207 of file webchild.h.

208 {
209 return E_NOTIMPL;
210 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DeactivateAndUndo()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::DeactivateAndUndo ( )
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 307 of file webchild.h.

308 {
309 return S_OK;
310 }

◆ detach()

HRESULT OleInPlaceClient::detach ( IOleObject ole_obj,
DWORD  dwSaveOption = OLECLOSE_SAVEIFDIRTY 
)
inline

Definition at line 172 of file webchild.h.

173 {
174 HRESULT hr = ole_obj->Close(dwSaveOption);
175
176 _hwnd = 0;
177
178 return hr;
179 }
HRESULT Close([in] DWORD dwSaveOption)

Referenced by IPCtrlWindow< BASE, SMARTPTR >::WndProc().

◆ DiscardUndoState()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::DiscardUndoState ( )
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 302 of file webchild.h.

303 {
304 return S_OK;
305 }

◆ GetContainer()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::GetContainer ( IOleContainer __RPC_FAR *__RPC_FAR ppContainer)
inlinevirtual

Definition at line 225 of file webchild.h.

226 {
227 ppContainer = 0;
228 return E_NOINTERFACE;
229 }
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ GetMoniker()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::GetMoniker ( DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker __RPC_FAR *__RPC_FAR ppmk 
)
inlinevirtual

Definition at line 220 of file webchild.h.

221 {
222 return E_NOTIMPL;
223 }

◆ GetWindow()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::GetWindow ( HWND __RPC_FAR phwnd)
inlinevirtual

Definition at line 201 of file webchild.h.

202 {
203 *phwnd = _hwnd;
204 return S_OK;
205 }

◆ GetWindowContext()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::GetWindowContext ( IOleInPlaceFrame __RPC_FAR *__RPC_FAR ppFrame,
IOleInPlaceUIWindow __RPC_FAR *__RPC_FAR ppDoc,
LPRECT  lprcPosRect,
LPRECT  lprcClipRect,
LPOLEINPLACEFRAMEINFO  lpFrameInfo 
)
inlinevirtual

Definition at line 264 of file webchild.h.

270 {
271 ClientRect rect(_hwnd);
272
273 ppFrame = 0;
274 ppDoc = 0;
275 *lprcPosRect = rect;
276 *lprcClipRect = rect;
277
278 assert(lpFrameInfo->cb>=sizeof(OLEINPLACEFRAMEINFO));
279 lpFrameInfo->fMDIApp = FALSE; //@@
280 lpFrameInfo->hwndFrame = 0;
281 lpFrameInfo->haccel = 0;
282 lpFrameInfo->cAccelEntries = 0;
283
284 return S_OK;
285 }
#define FALSE
Definition: types.h:117
#define assert(x)
Definition: debug.h:53
& rect
Definition: startmenu.cpp:1413

◆ OnInPlaceActivate()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::OnInPlaceActivate ( )
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 254 of file webchild.h.

255 {
256 return S_OK;
257 }

◆ OnInPlaceDeactivate()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::OnInPlaceDeactivate ( )
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 297 of file webchild.h.

298 {
299 return S_OK;
300 }

◆ OnPosRectChange()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::OnPosRectChange ( LPCRECT  lprcPosRect)
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 312 of file webchild.h.

313 {
314 return S_OK;
315 }

◆ OnShowWindow()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::OnShowWindow ( BOOL  fShow)
inlinevirtual

Implements IOleClientSite.

Definition at line 236 of file webchild.h.

237 {
238 return S_OK;
239 }

◆ OnUIActivate()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::OnUIActivate ( )
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 259 of file webchild.h.

260 {
261 return S_OK;
262 }

◆ OnUIDeactivate()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::OnUIDeactivate ( BOOL  fUndoable)
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 292 of file webchild.h.

293 {
294 return S_OK;
295 }

◆ QueryInterface()

STDMETHODIMP OleInPlaceClient::QueryInterface ( REFIID  riid,
LPVOID ppv 
)
inline

Definition at line 181 of file webchild.h.

182 {
184 {*ppv=static_cast<IOleClientSite*>(this); IncRef(); return S_OK;}
185
187 {*ppv=static_cast<IOleInPlaceSite*>(this); IncRef(); return S_OK;}
188
190 {*ppv=static_cast<IOleClientSite/*oder auch IOleInPlaceSite*/*>(this); IncRef(); return S_OK;}
191
192 return E_NOINTERFACE;
193 }
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IOleInPlaceSite
const GUID IID_IOleClientSite
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ RequestNewObjectLayout()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::RequestNewObjectLayout ( )
inlinevirtual

Implements IOleClientSite.

Definition at line 241 of file webchild.h.

242 {
243 return S_OK;
244 }

◆ SaveObject()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::SaveObject ( )
inlinevirtual

Implements IOleClientSite.

Definition at line 215 of file webchild.h.

216 {
217 return E_NOTIMPL;
218 }

◆ Scroll()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::Scroll ( SIZE  scrollExtant)
inlinevirtual

Implements IOleInPlaceSite.

Definition at line 287 of file webchild.h.

288 {
289 return S_OK;
290 }

◆ ShowObject()

virtual HRESULT STDMETHODCALLTYPE OleInPlaceClient::ShowObject ( )
inlinevirtual

Implements IOleClientSite.

Definition at line 231 of file webchild.h.

232 {
233 return S_OK;
234 }

◆ STDMETHODIMP_() [1/2]

OleInPlaceClient::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 195 of file webchild.h.

195{return IncRef();}

◆ STDMETHODIMP_() [2/2]

OleInPlaceClient::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 196 of file webchild.h.

196{return DecRef();}

Member Data Documentation

◆ _hwnd

HWND OleInPlaceClient::_hwnd
protected

Definition at line 146 of file webchild.h.

Referenced by attach(), detach(), GetWindow(), and GetWindowContext().


The documentation for this struct was generated from the following file: