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_view_hwnd)
37 SetWindowPos(This->doc_view_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 DefWindowProcA(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->shell_embedding_hwnd = CreateWindowExW(0, wszShellEmbedding, wszShellEmbedding,
95 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP | WS_MAXIMIZEBOX,
97 NULL, shdocvw_hinstance, This);
100 /**********************************************************************
101 * Implement the IOleObject interface for the WebBrowser control
104 #define OLEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleObject, iface)
106 static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
108 WebBrowser *This = OLEOBJ_THIS(iface);
109 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppv);
112 static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
114 WebBrowser *This = OLEOBJ_THIS(iface);
115 return IWebBrowser_AddRef(WEBBROWSER(This));
118 static ULONG WINAPI OleObject_Release(IOleObject *iface)
120 WebBrowser *This = OLEOBJ_THIS(iface);
121 return IWebBrowser_Release(WEBBROWSER(This));
124 static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite)
126 WebBrowser *This = OLEOBJ_THIS(iface);
129 TRACE("(%p)->(%p)\n", This, pClientSite);
131 if(This->client == pClientSite)
134 if(This->doc_view_hwnd) {
135 DestroyWindow(This->doc_view_hwnd);
136 This->doc_view_hwnd = NULL;
138 if(This->shell_embedding_hwnd) {
139 DestroyWindow(This->shell_embedding_hwnd);
140 This->shell_embedding_hwnd = NULL;
144 IDocHostUIHandler_Release(This->hostui);
146 IOleClientSite_Release(This->client);
150 deactivate_document(This);
155 This->client = pClientSite;
156 IOleClientSite_AddRef(pClientSite);
158 hres = IOleClientSite_QueryInterface(This->client, &IID_IDocHostUIHandler,
159 (void**)&This->hostui);
163 create_shell_embedding_hwnd(This);
168 static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, LPOLECLIENTSITE *ppClientSite)
170 WebBrowser *This = OLEOBJ_THIS(iface);
172 TRACE("(%p)->(%p)\n", This, ppClientSite);
178 IOleClientSite_AddRef(This->client);
179 *ppClientSite = This->client;
184 static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp,
185 LPCOLESTR szContainerObj)
187 WebBrowser *This = OLEOBJ_THIS(iface);
188 FIXME("(%p)->(%s, %s)\n", This, debugstr_w(szContainerApp), debugstr_w(szContainerObj));
192 static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
194 WebBrowser *This = OLEOBJ_THIS(iface);
195 FIXME("(%p)->(%ld)\n", This, dwSaveOption);
199 static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker* pmk)
201 WebBrowser *This = OLEOBJ_THIS(iface);
202 FIXME("(%p)->(%ld, %p)\n", This, dwWhichMoniker, pmk);
206 static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign,
207 DWORD dwWhichMoniker, LPMONIKER *ppmk)
209 WebBrowser *This = OLEOBJ_THIS(iface);
210 FIXME("(%p)->(%ld, %ld, %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
214 static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, LPDATAOBJECT pDataObject,
215 BOOL fCreation, DWORD dwReserved)
217 WebBrowser *This = OLEOBJ_THIS(iface);
218 FIXME("(%p)->(%p, %d, %ld)\n", This, pDataObject, fCreation, dwReserved);
222 static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved,
223 LPDATAOBJECT *ppDataObject)
225 WebBrowser *This = OLEOBJ_THIS(iface);
226 FIXME("(%p)->(%ld, %p)\n", This, dwReserved, ppDataObject);
230 static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg,
231 LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
233 WebBrowser *This = OLEOBJ_THIS(iface);
236 static const WCHAR wszitem[] = {'i','t','e','m',0};
238 TRACE("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent,
244 case OLEIVERB_INPLACEACTIVATE: {
245 IOleInPlaceSite *inplace;
247 TRACE("OLEIVERB_INPLACEACTIVATE\n");
252 hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSite, (void**)&inplace);
254 WARN("Could not get IOleInPlaceSite\n");
258 hres = IOleInPlaceSite_CanInPlaceActivate(inplace);
260 WARN("CanInPlaceActivate returned: %08lx\n", hres);
261 IOleInPlaceSite_Release(inplace);
265 hres = IOleInPlaceSite_GetWindow(inplace, &This->iphwnd);
267 This->iphwnd = hwndParent;
269 IOleInPlaceSite_OnInPlaceActivate(inplace);
271 IOleInPlaceSite_GetWindowContext(inplace, &This->frame, &This->uiwindow,
272 &This->pos_rect, &This->clip_rect,
276 if(iVerb == OLEIVERB_INPLACEACTIVATE)
277 IOleInPlaceSite_Release(inplace);
279 SetWindowPos(This->shell_embedding_hwnd, NULL,
280 This->pos_rect.left, This->pos_rect.top,
281 This->pos_rect.right-This->pos_rect.left,
282 This->pos_rect.bottom-This->pos_rect.top,
283 SWP_NOZORDER | SWP_SHOWWINDOW);
286 IOleClientSite_ShowObject(This->client);
287 IOleClientSite_GetContainer(This->client, &This->container);
291 IOleInPlaceFrame_GetWindow(This->frame, &This->frame_hwnd);
293 if(iVerb == OLEIVERB_INPLACEACTIVATE)
296 TRACE("OLEIVERB_SHOW\n");
298 IOleInPlaceSite_OnUIActivate(inplace);
299 IOleInPlaceSite_Release(inplace);
301 IOleInPlaceFrame_SetActiveObject(This->frame, ACTIVEOBJ(This), wszitem);
304 * IOleInPlaceFrmae_SetMenu
310 FIXME("stub for %ld\n", iVerb);
317 static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
319 WebBrowser *This = OLEOBJ_THIS(iface);
320 TRACE("(%p)->(%p)\n", This, ppEnumOleVerb);
321 return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb);
324 static HRESULT WINAPI OleObject_Update(IOleObject *iface)
326 WebBrowser *This = OLEOBJ_THIS(iface);
327 FIXME("(%p)\n", This);
331 static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
333 WebBrowser *This = OLEOBJ_THIS(iface);
334 FIXME("(%p)\n", This);
338 static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID* pClsid)
340 WebBrowser *This = OLEOBJ_THIS(iface);
341 FIXME("(%p)->(%p)\n", This, pClsid);
345 static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType,
346 LPOLESTR* pszUserType)
348 WebBrowser *This = OLEOBJ_THIS(iface);
349 TRACE("(%p, %ld, %p)\n", This, dwFormOfType, pszUserType);
350 return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
353 static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
355 WebBrowser *This = OLEOBJ_THIS(iface);
356 FIXME("(%p)->(%lx %p)\n", This, dwDrawAspect, psizel);
360 static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
362 WebBrowser *This = OLEOBJ_THIS(iface);
363 FIXME("(%p)->(%lx, %p)\n", This, dwDrawAspect, psizel);
367 static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink,
368 DWORD* pdwConnection)
370 WebBrowser *This = OLEOBJ_THIS(iface);
371 FIXME("(%p)->(%p, %p)\n", This, pAdvSink, pdwConnection);
375 static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
377 WebBrowser *This = OLEOBJ_THIS(iface);
378 FIXME("(%p)->(%ld)\n", This, dwConnection);
382 static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
384 WebBrowser *This = OLEOBJ_THIS(iface);
385 FIXME("(%p)->(%p)\n", This, ppenumAdvise);
389 static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
391 WebBrowser *This = OLEOBJ_THIS(iface);
394 TRACE("(%p)->(%lx, %p)\n", This, dwAspect, pdwStatus);
396 hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
404 static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE* pLogpal)
406 WebBrowser *This = OLEOBJ_THIS(iface);
407 FIXME("(%p)->(%p)\n", This, pLogpal);
413 static const IOleObjectVtbl OleObjectVtbl =
415 OleObject_QueryInterface,
418 OleObject_SetClientSite,
419 OleObject_GetClientSite,
420 OleObject_SetHostNames,
422 OleObject_SetMoniker,
423 OleObject_GetMoniker,
424 OleObject_InitFromData,
425 OleObject_GetClipboardData,
429 OleObject_IsUpToDate,
430 OleObject_GetUserClassID,
431 OleObject_GetUserType,
436 OleObject_EnumAdvise,
437 OleObject_GetMiscStatus,
438 OleObject_SetColorScheme
441 /**********************************************************************
442 * Implement the IOleInPlaceObject interface
445 #define INPLACEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceObject, iface)
447 static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface,
448 REFIID riid, LPVOID *ppobj)
450 WebBrowser *This = INPLACEOBJ_THIS(iface);
451 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
454 static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObject *iface)
456 WebBrowser *This = INPLACEOBJ_THIS(iface);
457 return IWebBrowser_AddRef(WEBBROWSER(This));
460 static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObject *iface)
462 WebBrowser *This = INPLACEOBJ_THIS(iface);
463 return IWebBrowser_Release(WEBBROWSER(This));
466 static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObject *iface, HWND* phwnd)
468 WebBrowser *This = INPLACEOBJ_THIS(iface);
470 TRACE("(%p)->(%p)\n", This, phwnd);
472 *phwnd = This->shell_embedding_hwnd;
476 static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp(IOleInPlaceObject *iface,
479 WebBrowser *This = INPLACEOBJ_THIS(iface);
480 FIXME("(%p)->(%x)\n", This, fEnterMode);
484 static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObject *iface)
486 WebBrowser *This = INPLACEOBJ_THIS(iface);
487 FIXME("(%p)\n", This);
491 static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObject *iface)
493 WebBrowser *This = INPLACEOBJ_THIS(iface);
494 FIXME("(%p)\n", This);
498 static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface,
499 LPCRECT lprcPosRect, LPCRECT lprcClipRect)
501 WebBrowser *This = INPLACEOBJ_THIS(iface);
503 TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
505 if(This->shell_embedding_hwnd) {
506 SetWindowPos(This->shell_embedding_hwnd, NULL,
507 lprcPosRect->left, lprcPosRect->top,
508 lprcPosRect->right-lprcPosRect->left,
509 lprcPosRect->bottom-lprcPosRect->top,
510 SWP_NOZORDER | SWP_NOACTIVATE);
516 static HRESULT WINAPI OleInPlaceObject_ReactivateAndUndo(IOleInPlaceObject *iface)
518 WebBrowser *This = INPLACEOBJ_THIS(iface);
519 FIXME("(%p)\n", This);
523 #undef INPLACEOBJ_THIS
525 static const IOleInPlaceObjectVtbl OleInPlaceObjectVtbl =
527 OleInPlaceObject_QueryInterface,
528 OleInPlaceObject_AddRef,
529 OleInPlaceObject_Release,
530 OleInPlaceObject_GetWindow,
531 OleInPlaceObject_ContextSensitiveHelp,
532 OleInPlaceObject_InPlaceDeactivate,
533 OleInPlaceObject_UIDeactivate,
534 OleInPlaceObject_SetObjectRects,
535 OleInPlaceObject_ReactivateAndUndo
538 /**********************************************************************
539 * Implement the IOleControl interface
542 #define CONTROL_THIS(iface) DEFINE_THIS(WebBrowser, OleControl, iface)
544 static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface,
545 REFIID riid, LPVOID *ppobj)
547 WebBrowser *This = CONTROL_THIS(iface);
548 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
551 static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
553 WebBrowser *This = CONTROL_THIS(iface);
554 return IWebBrowser_AddRef(WEBBROWSER(This));
557 static ULONG WINAPI OleControl_Release(IOleControl *iface)
559 WebBrowser *This = CONTROL_THIS(iface);
560 return IWebBrowser_Release(WEBBROWSER(This));
563 static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, LPCONTROLINFO pCI)
565 WebBrowser *This = CONTROL_THIS(iface);
566 FIXME("(%p)->(%p)\n", This, pCI);
570 static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, struct tagMSG *pMsg)
572 WebBrowser *This = CONTROL_THIS(iface);
573 FIXME("(%p)->(%p)\n", This, pMsg);
577 static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
579 WebBrowser *This = CONTROL_THIS(iface);
580 FIXME("(%p)->(%ld)\n", This, dispID);
584 static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
586 WebBrowser *This = CONTROL_THIS(iface);
587 FIXME("(%p)->(%x)\n", This, bFreeze);
593 static const IOleControlVtbl OleControlVtbl =
595 OleControl_QueryInterface,
598 OleControl_GetControlInfo,
599 OleControl_OnMnemonic,
600 OleControl_OnAmbientPropertyChange,
601 OleControl_FreezeEvents
604 #define ACTIVEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceActiveObject, iface)
606 static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface,
607 REFIID riid, void **ppv)
609 WebBrowser *This = ACTIVEOBJ_THIS(iface);
610 return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv);
613 static ULONG WINAPI InPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
615 WebBrowser *This = ACTIVEOBJ_THIS(iface);
616 return IWebBrowser2_AddRef(WEBBROWSER2(This));
619 static ULONG WINAPI InPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
621 WebBrowser *This = ACTIVEOBJ_THIS(iface);
622 return IWebBrowser2_Release(WEBBROWSER2(This));
625 static HRESULT WINAPI InPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface,
628 WebBrowser *This = ACTIVEOBJ_THIS(iface);
629 return IOleInPlaceObject_GetWindow(INPLACEOBJ(This), phwnd);
632 static HRESULT WINAPI InPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface,
635 WebBrowser *This = ACTIVEOBJ_THIS(iface);
636 return IOleInPlaceObject_ContextSensitiveHelp(INPLACEOBJ(This), fEnterMode);
639 static HRESULT WINAPI InPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface,
642 WebBrowser *This = ACTIVEOBJ_THIS(iface);
643 FIXME("(%p)->(%p)\n", This, lpmsg);
647 static HRESULT WINAPI InPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
650 WebBrowser *This = ACTIVEOBJ_THIS(iface);
651 FIXME("(%p)->(%x)\n", This, fActivate);
655 static HRESULT WINAPI InPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface,
658 WebBrowser *This = ACTIVEOBJ_THIS(iface);
659 FIXME("(%p)->(%x)\n", This, fActivate);
663 static HRESULT WINAPI InPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface,
664 LPCRECT lprcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
666 WebBrowser *This = ACTIVEOBJ_THIS(iface);
667 FIXME("(%p)->(%p %p %x)\n", This, lprcBorder, pUIWindow, fFrameWindow);
671 static HRESULT WINAPI InPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface,
674 WebBrowser *This = ACTIVEOBJ_THIS(iface);
675 FIXME("(%p)->(%x)\n", This, fEnable);
679 #undef ACTIVEOBJ_THIS
681 static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
682 InPlaceActiveObject_QueryInterface,
683 InPlaceActiveObject_AddRef,
684 InPlaceActiveObject_Release,
685 InPlaceActiveObject_GetWindow,
686 InPlaceActiveObject_ContextSensitiveHelp,
687 InPlaceActiveObject_TranslateAccelerator,
688 InPlaceActiveObject_OnFrameWindowActivate,
689 InPlaceActiveObject_OnDocWindowActivate,
690 InPlaceActiveObject_ResizeBorder,
691 InPlaceActiveObject_EnableModeless
694 #define OLECMD_THIS(iface) DEFINE_THIS(WebBrowser, WBOleCommandTarget, iface)
696 static HRESULT WINAPI WBOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
697 REFIID riid, void **ppv)
699 WebBrowser *This = OLECMD_THIS(iface);
700 return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv);
703 static ULONG WINAPI WBOleCommandTarget_AddRef(IOleCommandTarget *iface)
705 WebBrowser *This = OLECMD_THIS(iface);
706 return IWebBrowser2_AddRef(WEBBROWSER(This));
709 static ULONG WINAPI WBOleCommandTarget_Release(IOleCommandTarget *iface)
711 WebBrowser *This = OLECMD_THIS(iface);
712 return IWebBrowser2_Release(WEBBROWSER(This));
715 static HRESULT WINAPI WBOleCommandTarget_QueryStatus(IOleCommandTarget *iface,
716 const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
718 WebBrowser *This = OLECMD_THIS(iface);
719 FIXME("(%p)->(%s %lu %p %p)\n", This, debugstr_guid(pguidCmdGroup), cCmds, prgCmds,
724 static HRESULT WINAPI WBOleCommandTarget_Exec(IOleCommandTarget *iface,
725 const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn,
728 WebBrowser *This = OLECMD_THIS(iface);
729 FIXME("(%p)->(%s %ld %ld %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID,
730 nCmdexecopt, pvaIn, pvaOut);
736 static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
737 WBOleCommandTarget_QueryInterface,
738 WBOleCommandTarget_AddRef,
739 WBOleCommandTarget_Release,
740 WBOleCommandTarget_QueryStatus,
741 WBOleCommandTarget_Exec
744 void WebBrowser_OleObject_Init(WebBrowser *This)
746 This->lpOleObjectVtbl = &OleObjectVtbl;
747 This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
748 This->lpOleControlVtbl = &OleControlVtbl;
749 This->lpOleInPlaceActiveObjectVtbl = &OleInPlaceActiveObjectVtbl;
750 This->lpWBOleCommandTargetVtbl = &OleCommandTargetVtbl;
753 This->container = NULL;
755 This->frame_hwnd = NULL;
757 This->uiwindow = NULL;
758 This->shell_embedding_hwnd = NULL;
760 memset(&This->pos_rect, 0, sizeof(RECT));
761 memset(&This->clip_rect, 0, sizeof(RECT));
762 memset(&This->frameinfo, 0, sizeof(OLEINPLACEFRAMEINFO));
765 void WebBrowser_OleObject_Destroy(WebBrowser *This)
768 IOleObject_SetClientSite(OLEOBJ(This), NULL);
770 IOleContainer_Release(This->container);
772 IOleInPlaceFrame_Release(This->frame);
774 IOleInPlaceUIWindow_Release(This->uiwindow);