shdocvw: Added WebBrowser::[get|put]_MenuBar implementation.

This commit is contained in:
Jacek Caban 2006-04-28 23:45:36 +02:00 committed by Alexandre Julliard
parent 8cde167fd9
commit 9c4f120e88
2 changed files with 19 additions and 4 deletions

View File

@ -116,6 +116,7 @@ typedef struct {
HWND shell_embedding_hwnd;
VARIANT_BOOL visible;
VARIANT_BOOL menu_bar;
DocHost doc_host;
} WebBrowser;

View File

@ -559,15 +559,28 @@ static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
static HRESULT WINAPI WebBrowser_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%p)\n", This, Value);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, Value);
*Value = This->menu_bar;
return S_OK;
}
static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%x)\n", This, Value);
return E_NOTIMPL;
VARIANTARG arg;
DISPPARAMS dispparams = {&arg, NULL, 1, 0};
TRACE("(%p)->(%x)\n", This, Value);
This->menu_bar = Value;
V_VT(&arg) = VT_BOOL;
V_BOOL(&arg) = Value;
call_sink(This->doc_host.cp_wbe2, DISPID_ONMENUBAR, &dispparams);
return S_OK;
}
static HRESULT WINAPI WebBrowser_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
@ -860,6 +873,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
DocHost_Init(&ret->doc_host, (IDispatch*)WEBBROWSER2(ret));
ret->visible = VARIANT_TRUE;
ret->menu_bar = VARIANT_TRUE;
WebBrowser_OleObject_Init(ret);
WebBrowser_ViewObject_Init(ret);