2 * Implementation of IOleObject interfaces for WebBrowser control
8 * Copyright 2001 John R. Sheets (for CodeWeavers)
9 * Copyright 2005 Jacek Caban
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
32 static ATOM shell_embedding_atom = 0;
34 static LRESULT resize_window(WebBrowser *This, LONG width, LONG height)
36 if(This->doc_host.hwnd)
37 SetWindowPos(This->doc_host.hwnd, NULL, 0, 0, width, height,
38 SWP_NOZORDER | SWP_NOACTIVATE);
43 static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
47 static const WCHAR wszTHIS[] = {'T','H','I','S',0};
49 if(msg == WM_CREATE) {
50 This = *(WebBrowser**)lParam;
51 SetPropW(hwnd, wszTHIS, This);
53 This = GetPropW(hwnd, wszTHIS);
58 return resize_window(This, LOWORD(lParam), HIWORD(lParam));
61 return DefWindowProcW(hwnd, msg, wParam, lParam);
64 static void create_shell_embedding_hwnd(WebBrowser *This)
66 IOleInPlaceSite *inplace;
70 static const WCHAR wszShellEmbedding[] =
71 {'S','h','e','l','l',' ','E','m','b','e','d','d','i','n','g',0};
73 if(!shell_embedding_atom) {
74 static WNDCLASSEXW wndclass = {
78 0, 0 /* native uses 8 */, NULL, NULL, NULL,
79 (HBRUSH)COLOR_WINDOWFRAME, NULL,
83 wndclass.hInstance = shdocvw_hinstance;
85 RegisterClassExW(&wndclass);
88 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleInPlaceSite, (void**)&inplace);
90 IOleInPlaceSite_GetWindow(inplace, &parent);
91 IOleInPlaceSite_Release(inplace);
94 This->doc_host.frame_hwnd = This->shell_embedding_hwnd = CreateWindowExW(
96 wszShellEmbedding, wszShellEmbedding,
97 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP,
99 NULL, shdocvw_hinstance, This);
102 /**********************************************************************
103 * Implement the IOleObject interface for the WebBrowser control
106 #define OLEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleObject, iface)
108 static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
110 WebBrowser *This = OLEOBJ_THIS(iface);
111 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppv);
114 static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
116 WebBrowser *This = OLEOBJ_THIS(iface);
117 return IWebBrowser_AddRef(WEBBROWSER(This));
120 static ULONG WINAPI OleObject_Release(IOleObject *iface)
122 WebBrowser *This = OLEOBJ_THIS(iface);
123 return IWebBrowser_Release(WEBBROWSER(This));
126 static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite)
128 WebBrowser *This = OLEOBJ_THIS(iface);
131 TRACE("(%p)->(%p)\n", This, pClientSite);
133 if(This->client == pClientSite)
136 if(This->doc_host.hwnd) {
137 DestroyWindow(This->doc_host.hwnd);
138 This->doc_host.hwnd = NULL;
140 if(This->shell_embedding_hwnd) {
141 DestroyWindow(This->shell_embedding_hwnd);
142 This->shell_embedding_hwnd = NULL;
146 IOleInPlaceSite_Release(This->inplace);
147 This->inplace = NULL;
150 if(This->doc_host.hostui)
151 IDocHostUIHandler_Release(This->doc_host.hostui);
153 IOleClientSite_Release(This->client);
156 if(This->doc_host.document)
157 deactivate_document(&This->doc_host);
162 This->client = pClientSite;
163 IOleClientSite_AddRef(pClientSite);
165 hres = IOleClientSite_QueryInterface(This->client, &IID_IDocHostUIHandler,
166 (void**)&This->doc_host.hostui);
168 This->doc_host.hostui = NULL;
170 create_shell_embedding_hwnd(This);
175 static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, LPOLECLIENTSITE *ppClientSite)
177 WebBrowser *This = OLEOBJ_THIS(iface);
179 TRACE("(%p)->(%p)\n", This, ppClientSite);
185 IOleClientSite_AddRef(This->client);
186 *ppClientSite = This->client;
191 static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp,
192 LPCOLESTR szContainerObj)
194 WebBrowser *This = OLEOBJ_THIS(iface);
195 FIXME("(%p)->(%s, %s)\n", This, debugstr_w(szContainerApp), debugstr_w(szContainerObj));
199 static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
201 WebBrowser *This = OLEOBJ_THIS(iface);
202 FIXME("(%p)->(%ld)\n", This, dwSaveOption);
206 static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker* pmk)
208 WebBrowser *This = OLEOBJ_THIS(iface);
209 FIXME("(%p)->(%ld, %p)\n", This, dwWhichMoniker, pmk);
213 static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign,
214 DWORD dwWhichMoniker, LPMONIKER *ppmk)
216 WebBrowser *This = OLEOBJ_THIS(iface);
217 FIXME("(%p)->(%ld, %ld, %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
221 static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, LPDATAOBJECT pDataObject,
222 BOOL fCreation, DWORD dwReserved)
224 WebBrowser *This = OLEOBJ_THIS(iface);
225 FIXME("(%p)->(%p, %d, %ld)\n", This, pDataObject, fCreation, dwReserved);
229 static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved,
230 LPDATAOBJECT *ppDataObject)
232 WebBrowser *This = OLEOBJ_THIS(iface);
233 FIXME("(%p)->(%ld, %p)\n", This, dwReserved, ppDataObject);
237 static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg,
238 LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
240 WebBrowser *This = OLEOBJ_THIS(iface);
243 static const WCHAR wszitem[] = {'i','t','e','m',0};
245 TRACE("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent,
251 case OLEIVERB_INPLACEACTIVATE:
252 TRACE("OLEIVERB_INPLACEACTIVATE\n");
258 IOleInPlaceSite_Release(This->inplace);
259 This->inplace = NULL;
262 hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSite, (void**)&This->inplace);
264 WARN("Could not get IOleInPlaceSite\n");
268 hres = IOleInPlaceSite_CanInPlaceActivate(This->inplace);
270 WARN("CanInPlaceActivate returned: %08lx\n", hres);
271 IOleInPlaceSite_Release(This->inplace);
275 hres = IOleInPlaceSite_GetWindow(This->inplace, &This->iphwnd);
277 This->iphwnd = hwndParent;
279 IOleInPlaceSite_OnInPlaceActivate(This->inplace);
281 IOleInPlaceSite_GetWindowContext(This->inplace, &This->frame, &This->uiwindow,
282 &This->pos_rect, &This->clip_rect,
286 if(iVerb == OLEIVERB_INPLACEACTIVATE)
287 IOleInPlaceSite_Release(This->inplace);
289 SetWindowPos(This->shell_embedding_hwnd, NULL,
290 This->pos_rect.left, This->pos_rect.top,
291 This->pos_rect.right-This->pos_rect.left,
292 This->pos_rect.bottom-This->pos_rect.top,
293 SWP_NOZORDER | SWP_SHOWWINDOW);
296 IOleClientSite_ShowObject(This->client);
297 IOleClientSite_GetContainer(This->client, &This->container);
301 IOleInPlaceFrame_GetWindow(This->frame, &This->frame_hwnd);
303 if(iVerb == OLEIVERB_INPLACEACTIVATE)
306 TRACE("OLEIVERB_SHOW\n");
308 IOleInPlaceSite_OnUIActivate(This->inplace);
309 IOleInPlaceSite_Release(This->inplace);
312 IOleInPlaceFrame_SetActiveObject(This->frame, ACTIVEOBJ(This), wszitem);
314 IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, ACTIVEOBJ(This), wszitem);
317 * IOleInPlaceFrmae_SetMenu
322 FIXME("stub for %ld\n", iVerb);
329 static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
331 WebBrowser *This = OLEOBJ_THIS(iface);
332 TRACE("(%p)->(%p)\n", This, ppEnumOleVerb);
333 return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb);
336 static HRESULT WINAPI OleObject_Update(IOleObject *iface)
338 WebBrowser *This = OLEOBJ_THIS(iface);
339 FIXME("(%p)\n", This);
343 static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
345 WebBrowser *This = OLEOBJ_THIS(iface);
346 FIXME("(%p)\n", This);
350 static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID* pClsid)
352 WebBrowser *This = OLEOBJ_THIS(iface);
353 FIXME("(%p)->(%p)\n", This, pClsid);
357 static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType,
358 LPOLESTR* pszUserType)
360 WebBrowser *This = OLEOBJ_THIS(iface);
361 TRACE("(%p, %ld, %p)\n", This, dwFormOfType, pszUserType);
362 return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
365 static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
367 WebBrowser *This = OLEOBJ_THIS(iface);
368 FIXME("(%p)->(%lx %p)\n", This, dwDrawAspect, psizel);
372 static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
374 WebBrowser *This = OLEOBJ_THIS(iface);
375 FIXME("(%p)->(%lx, %p)\n", This, dwDrawAspect, psizel);
379 static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink,
380 DWORD* pdwConnection)
382 WebBrowser *This = OLEOBJ_THIS(iface);
383 FIXME("(%p)->(%p, %p)\n", This, pAdvSink, pdwConnection);
387 static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
389 WebBrowser *This = OLEOBJ_THIS(iface);
390 FIXME("(%p)->(%ld)\n", This, dwConnection);
394 static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
396 WebBrowser *This = OLEOBJ_THIS(iface);
397 FIXME("(%p)->(%p)\n", This, ppenumAdvise);
401 static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
403 WebBrowser *This = OLEOBJ_THIS(iface);
406 TRACE("(%p)->(%lx, %p)\n", This, dwAspect, pdwStatus);
408 hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
416 static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE* pLogpal)
418 WebBrowser *This = OLEOBJ_THIS(iface);
419 FIXME("(%p)->(%p)\n", This, pLogpal);
425 static const IOleObjectVtbl OleObjectVtbl =
427 OleObject_QueryInterface,
430 OleObject_SetClientSite,
431 OleObject_GetClientSite,
432 OleObject_SetHostNames,
434 OleObject_SetMoniker,
435 OleObject_GetMoniker,
436 OleObject_InitFromData,
437 OleObject_GetClipboardData,
441 OleObject_IsUpToDate,
442 OleObject_GetUserClassID,
443 OleObject_GetUserType,
448 OleObject_EnumAdvise,
449 OleObject_GetMiscStatus,
450 OleObject_SetColorScheme
453 /**********************************************************************
454 * Implement the IOleInPlaceObject interface
457 #define INPLACEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceObject, iface)
459 static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface,
460 REFIID riid, LPVOID *ppobj)
462 WebBrowser *This = INPLACEOBJ_THIS(iface);
463 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
466 static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObject *iface)
468 WebBrowser *This = INPLACEOBJ_THIS(iface);
469 return IWebBrowser_AddRef(WEBBROWSER(This));
472 static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObject *iface)
474 WebBrowser *This = INPLACEOBJ_THIS(iface);
475 return IWebBrowser_Release(WEBBROWSER(This));
478 static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObject *iface, HWND* phwnd)
480 WebBrowser *This = INPLACEOBJ_THIS(iface);
482 TRACE("(%p)->(%p)\n", This, phwnd);
484 *phwnd = This->shell_embedding_hwnd;
488 static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp(IOleInPlaceObject *iface,
491 WebBrowser *This = INPLACEOBJ_THIS(iface);
492 FIXME("(%p)->(%x)\n", This, fEnterMode);
496 static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObject *iface)
498 WebBrowser *This = INPLACEOBJ_THIS(iface);
499 FIXME("(%p)\n", This);
503 static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObject *iface)
505 WebBrowser *This = INPLACEOBJ_THIS(iface);
506 FIXME("(%p)\n", This);
510 static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface,
511 LPCRECT lprcPosRect, LPCRECT lprcClipRect)
513 WebBrowser *This = INPLACEOBJ_THIS(iface);
515 TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
517 memcpy(&This->pos_rect, lprcPosRect, sizeof(RECT));
520 memcpy(&This->clip_rect, lprcClipRect, sizeof(RECT));
522 if(This->shell_embedding_hwnd) {
523 SetWindowPos(This->shell_embedding_hwnd, NULL,
524 lprcPosRect->left, lprcPosRect->top,
525 lprcPosRect->right-lprcPosRect->left,
526 lprcPosRect->bottom-lprcPosRect->top,
527 SWP_NOZORDER | SWP_NOACTIVATE);
533 static HRESULT WINAPI OleInPlaceObject_ReactivateAndUndo(IOleInPlaceObject *iface)
535 WebBrowser *This = INPLACEOBJ_THIS(iface);
536 FIXME("(%p)\n", This);
540 #undef INPLACEOBJ_THIS
542 static const IOleInPlaceObjectVtbl OleInPlaceObjectVtbl =
544 OleInPlaceObject_QueryInterface,
545 OleInPlaceObject_AddRef,
546 OleInPlaceObject_Release,
547 OleInPlaceObject_GetWindow,
548 OleInPlaceObject_ContextSensitiveHelp,
549 OleInPlaceObject_InPlaceDeactivate,
550 OleInPlaceObject_UIDeactivate,
551 OleInPlaceObject_SetObjectRects,
552 OleInPlaceObject_ReactivateAndUndo
555 /**********************************************************************
556 * Implement the IOleControl interface
559 #define CONTROL_THIS(iface) DEFINE_THIS(WebBrowser, OleControl, iface)
561 static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface,
562 REFIID riid, LPVOID *ppobj)
564 WebBrowser *This = CONTROL_THIS(iface);
565 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
568 static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
570 WebBrowser *This = CONTROL_THIS(iface);
571 return IWebBrowser_AddRef(WEBBROWSER(This));
574 static ULONG WINAPI OleControl_Release(IOleControl *iface)
576 WebBrowser *This = CONTROL_THIS(iface);
577 return IWebBrowser_Release(WEBBROWSER(This));
580 static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, LPCONTROLINFO pCI)
582 WebBrowser *This = CONTROL_THIS(iface);
583 FIXME("(%p)->(%p)\n", This, pCI);
587 static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, struct tagMSG *pMsg)
589 WebBrowser *This = CONTROL_THIS(iface);
590 FIXME("(%p)->(%p)\n", This, pMsg);
594 static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
596 WebBrowser *This = CONTROL_THIS(iface);
597 FIXME("(%p)->(%ld)\n", This, dispID);
601 static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
603 WebBrowser *This = CONTROL_THIS(iface);
604 FIXME("(%p)->(%x)\n", This, bFreeze);
610 static const IOleControlVtbl OleControlVtbl =
612 OleControl_QueryInterface,
615 OleControl_GetControlInfo,
616 OleControl_OnMnemonic,
617 OleControl_OnAmbientPropertyChange,
618 OleControl_FreezeEvents
621 #define ACTIVEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceActiveObject, iface)
623 static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface,
624 REFIID riid, void **ppv)
626 WebBrowser *This = ACTIVEOBJ_THIS(iface);
627 return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv);
630 static ULONG WINAPI InPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
632 WebBrowser *This = ACTIVEOBJ_THIS(iface);
633 return IWebBrowser2_AddRef(WEBBROWSER2(This));
636 static ULONG WINAPI InPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
638 WebBrowser *This = ACTIVEOBJ_THIS(iface);
639 return IWebBrowser2_Release(WEBBROWSER2(This));
642 static HRESULT WINAPI InPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface,
645 WebBrowser *This = ACTIVEOBJ_THIS(iface);
646 return IOleInPlaceObject_GetWindow(INPLACEOBJ(This), phwnd);
649 static HRESULT WINAPI InPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface,
652 WebBrowser *This = ACTIVEOBJ_THIS(iface);
653 return IOleInPlaceObject_ContextSensitiveHelp(INPLACEOBJ(This), fEnterMode);
656 static HRESULT WINAPI InPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface,
659 WebBrowser *This = ACTIVEOBJ_THIS(iface);
660 FIXME("(%p)->(%p)\n", This, lpmsg);
664 static HRESULT WINAPI InPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
667 WebBrowser *This = ACTIVEOBJ_THIS(iface);
668 FIXME("(%p)->(%x)\n", This, fActivate);
672 static HRESULT WINAPI InPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface,
675 WebBrowser *This = ACTIVEOBJ_THIS(iface);
676 FIXME("(%p)->(%x)\n", This, fActivate);
680 static HRESULT WINAPI InPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface,
681 LPCRECT lprcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
683 WebBrowser *This = ACTIVEOBJ_THIS(iface);
684 FIXME("(%p)->(%p %p %x)\n", This, lprcBorder, pUIWindow, fFrameWindow);
688 static HRESULT WINAPI InPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface,
691 WebBrowser *This = ACTIVEOBJ_THIS(iface);
692 FIXME("(%p)->(%x)\n", This, fEnable);
696 #undef ACTIVEOBJ_THIS
698 static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
699 InPlaceActiveObject_QueryInterface,
700 InPlaceActiveObject_AddRef,
701 InPlaceActiveObject_Release,
702 InPlaceActiveObject_GetWindow,
703 InPlaceActiveObject_ContextSensitiveHelp,
704 InPlaceActiveObject_TranslateAccelerator,
705 InPlaceActiveObject_OnFrameWindowActivate,
706 InPlaceActiveObject_OnDocWindowActivate,
707 InPlaceActiveObject_ResizeBorder,
708 InPlaceActiveObject_EnableModeless
711 #define OLECMD_THIS(iface) DEFINE_THIS(WebBrowser, WBOleCommandTarget, iface)
713 static HRESULT WINAPI WBOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
714 REFIID riid, void **ppv)
716 WebBrowser *This = OLECMD_THIS(iface);
717 return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv);
720 static ULONG WINAPI WBOleCommandTarget_AddRef(IOleCommandTarget *iface)
722 WebBrowser *This = OLECMD_THIS(iface);
723 return IWebBrowser2_AddRef(WEBBROWSER(This));
726 static ULONG WINAPI WBOleCommandTarget_Release(IOleCommandTarget *iface)
728 WebBrowser *This = OLECMD_THIS(iface);
729 return IWebBrowser2_Release(WEBBROWSER(This));
732 static HRESULT WINAPI WBOleCommandTarget_QueryStatus(IOleCommandTarget *iface,
733 const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
735 WebBrowser *This = OLECMD_THIS(iface);
736 FIXME("(%p)->(%s %lu %p %p)\n", This, debugstr_guid(pguidCmdGroup), cCmds, prgCmds,
741 static HRESULT WINAPI WBOleCommandTarget_Exec(IOleCommandTarget *iface,
742 const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn,
745 WebBrowser *This = OLECMD_THIS(iface);
746 FIXME("(%p)->(%s %ld %ld %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID,
747 nCmdexecopt, pvaIn, pvaOut);
753 static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
754 WBOleCommandTarget_QueryInterface,
755 WBOleCommandTarget_AddRef,
756 WBOleCommandTarget_Release,
757 WBOleCommandTarget_QueryStatus,
758 WBOleCommandTarget_Exec
761 void WebBrowser_OleObject_Init(WebBrowser *This)
763 This->lpOleObjectVtbl = &OleObjectVtbl;
764 This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
765 This->lpOleControlVtbl = &OleControlVtbl;
766 This->lpOleInPlaceActiveObjectVtbl = &OleInPlaceActiveObjectVtbl;
767 This->lpWBOleCommandTargetVtbl = &OleCommandTargetVtbl;
770 This->inplace = NULL;
771 This->container = NULL;
773 This->frame_hwnd = NULL;
775 This->uiwindow = NULL;
776 This->shell_embedding_hwnd = NULL;
778 memset(&This->pos_rect, 0, sizeof(RECT));
779 memset(&This->clip_rect, 0, sizeof(RECT));
780 memset(&This->frameinfo, 0, sizeof(OLEINPLACEFRAMEINFO));
783 void WebBrowser_OleObject_Destroy(WebBrowser *This)
786 IOleObject_SetClientSite(OLEOBJ(This), NULL);
788 IOleContainer_Release(This->container);
790 IOleInPlaceFrame_Release(This->frame);
792 IOleInPlaceUIWindow_Release(This->uiwindow);