shdocvw: Added InternetExplorer::get_Visible implementation.
This commit is contained in:
parent
74ccbf0083
commit
f48fa4b945
|
@ -372,8 +372,11 @@ static HRESULT WINAPI InternetExplorer_get_Path(IWebBrowser2 *iface, BSTR *Path)
|
||||||
static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
|
static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
|
||||||
{
|
{
|
||||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pBool);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, pBool);
|
||||||
|
|
||||||
|
*pBool = IsWindowVisible(This->frame_hwnd) ? VARIANT_TRUE : VARIANT_FALSE;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI InternetExplorer_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
static HRESULT WINAPI InternetExplorer_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
||||||
|
|
|
@ -27,6 +27,28 @@
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "exdisp.h"
|
#include "exdisp.h"
|
||||||
|
|
||||||
|
static void test_visible(IWebBrowser2 *wb)
|
||||||
|
{
|
||||||
|
VARIANT_BOOL b;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
b = 0x100;
|
||||||
|
hres = IWebBrowser2_get_Visible(wb, &b);
|
||||||
|
ok(hres == S_OK, "get_Visible failed: %08x\n", hres);
|
||||||
|
ok(b == VARIANT_FALSE, "Visible = %x\n", hres);
|
||||||
|
|
||||||
|
hres = IWebBrowser2_put_Visible(wb, VARIANT_TRUE);
|
||||||
|
ok(hres == S_OK, "put_Visible failed: %08x\n", hres);
|
||||||
|
|
||||||
|
b = 0x100;
|
||||||
|
hres = IWebBrowser2_get_Visible(wb, &b);
|
||||||
|
ok(hres == S_OK, "get_Visible failed: %08x\n", hres);
|
||||||
|
ok(b == VARIANT_TRUE, "Visible = %x\n", hres);
|
||||||
|
|
||||||
|
hres = IWebBrowser2_put_Visible(wb, VARIANT_FALSE);
|
||||||
|
ok(hres == S_OK, "put_Visible failed: %08x\n", hres);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_InternetExplorer(void)
|
static void test_InternetExplorer(void)
|
||||||
{
|
{
|
||||||
IWebBrowser2 *wb;
|
IWebBrowser2 *wb;
|
||||||
|
@ -44,6 +66,8 @@ static void test_InternetExplorer(void)
|
||||||
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
|
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
|
||||||
ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres);
|
ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres);
|
||||||
|
|
||||||
|
test_visible(wb);
|
||||||
|
|
||||||
IWebBrowser2_Release(wb);
|
IWebBrowser2_Release(wb);
|
||||||
ref = IUnknown_Release(unk);
|
ref = IUnknown_Release(unk);
|
||||||
ok(!ref, "object not destroyed, ref=%u\n", ref);
|
ok(!ref, "object not destroyed, ref=%u\n", ref);
|
||||||
|
|
Loading…
Reference in New Issue