static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg, LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { WebBrowser *This = impl_from_IOleObject(iface); TRACE("(%p)->(%d %p %p %d %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect); switch (iVerb) { case OLEIVERB_SHOW: TRACE("OLEIVERB_SHOW\n"); return activate_ui(This, pActiveSite); case OLEIVERB_UIACTIVATE: TRACE("OLEIVERB_UIACTIVATE\n"); return activate_ui(This, pActiveSite); case OLEIVERB_INPLACEACTIVATE: TRACE("OLEIVERB_INPLACEACTIVATE\n"); return activate_inplace(This, pActiveSite); case OLEIVERB_HIDE: TRACE("OLEIVERB_HIDE\n"); if(This->shell_embedding_hwnd) ShowWindow(This->shell_embedding_hwnd, SW_HIDE); return S_OK; default: FIXME("stub for %d\n", iVerb); break; } return E_NOTIMPL; }
static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site) { HRESULT hres; static const WCHAR wszitem[] = {'i','t','e','m',0}; if(This->inplace) { if(This->shell_embedding_hwnd) ShowWindow(This->shell_embedding_hwnd, SW_SHOW); return S_OK; } hres = activate_inplace(This, active_site); if(FAILED(hres)) return hres; IOleInPlaceSite_OnUIActivate(This->inplace); if(This->doc_host.frame) IOleInPlaceFrame_SetActiveObject(This->doc_host.frame, &This->IOleInPlaceActiveObject_iface, wszitem); if(This->uiwindow) IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, &This->IOleInPlaceActiveObject_iface, wszitem); if(This->doc_host.frame) IOleInPlaceFrame_SetMenu(This->doc_host.frame, NULL, NULL, This->shell_embedding_hwnd); SetFocus(This->shell_embedding_hwnd); return S_OK; }
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg, LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { WebBrowser *This = OLEOBJ_THIS(iface); TRACE("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect); switch (iVerb) { case OLEIVERB_SHOW: TRACE("OLEIVERB_SHOW\n"); return activate_ui(This, pActiveSite, hwndParent); case OLEIVERB_UIACTIVATE: TRACE("OLEIVERB_UIACTIVATE\n"); return activate_ui(This, pActiveSite, hwndParent); case OLEIVERB_INPLACEACTIVATE: TRACE("OLEIVERB_INPLACEACTIVATE\n"); return activate_inplace(This, pActiveSite, hwndParent); default: FIXME("stub for %ld\n", iVerb); break; } return E_NOTIMPL; }
static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site, HWND parent_hwnd) { HRESULT hres; static const WCHAR wszitem[] = {'i','t','e','m',0}; if(This->inplace) return S_OK; hres = activate_inplace(This, active_site, parent_hwnd); if(FAILED(hres)) return hres; IOleInPlaceSite_OnUIActivate(This->inplace); if(This->frame) IOleInPlaceFrame_SetActiveObject(This->frame, ACTIVEOBJ(This), wszitem); if(This->uiwindow) IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, ACTIVEOBJ(This), wszitem); if(This->frame) IOleInPlaceFrame_SetMenu(This->frame, NULL, NULL, This->shell_embedding_hwnd); SetFocus(This->shell_embedding_hwnd); return S_OK; }
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { WindowsMediaPlayer *This = impl_from_IOleObject(iface); switch(iVerb) { case OLEIVERB_INPLACEACTIVATE: TRACE("(%p)->(OLEIVERB_INPLACEACTIVATE)\n", This); return activate_inplace(This); case OLEIVERB_HIDE: if(!This->hwnd) { FIXME("No window to hide\n"); return E_UNEXPECTED; } ShowWindow(This->hwnd, SW_HIDE); return S_OK; default: FIXME("Unsupported iVerb %d\n", iVerb); } return E_NOTIMPL; }
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg, LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { WebBrowser *This = impl_from_IOleObject(iface); TRACE("(%p)->(%d %p %p %d %p %s)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect)); /* restore closed client site if we have one */ if(!This->client && This->client_closed) { IOleClientSite *client = This->client_closed; This->client_closed = NULL; IOleObject_SetClientSite(iface, client); IOleClientSite_Release(client); } switch (iVerb) { case OLEIVERB_SHOW: TRACE("OLEIVERB_SHOW\n"); return activate_ui(This, pActiveSite); case OLEIVERB_UIACTIVATE: TRACE("OLEIVERB_UIACTIVATE\n"); return activate_ui(This, pActiveSite); case OLEIVERB_INPLACEACTIVATE: TRACE("OLEIVERB_INPLACEACTIVATE\n"); return activate_inplace(This, pActiveSite); case OLEIVERB_HIDE: TRACE("OLEIVERB_HIDE\n"); if(This->inplace) IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace); if(This->shell_embedding_hwnd) ShowWindow(This->shell_embedding_hwnd, SW_HIDE); return S_OK; default: FIXME("stub for %d\n", iVerb); break; } return E_NOTIMPL; }