Jacek Caban : shdocvw: Added InternetExplorer::get_Visible implementation.

Alexandre Julliard julliard at winehq.org
Mon Jan 10 10:55:16 CST 2011


Module: wine
Branch: master
Commit: f48fa4b945bebfbab5f4980c175e9a5915625c7d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f48fa4b945bebfbab5f4980c175e9a5915625c7d

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jan  7 19:05:16 2011 +0100

shdocvw: Added InternetExplorer::get_Visible implementation.

---

 dlls/shdocvw/ie.c       |    7 +++++--
 dlls/shdocvw/tests/ie.c |   24 ++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/dlls/shdocvw/ie.c b/dlls/shdocvw/ie.c
index f968302..7b59839 100644
--- a/dlls/shdocvw/ie.c
+++ b/dlls/shdocvw/ie.c
@@ -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)
 {
     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)
diff --git a/dlls/shdocvw/tests/ie.c b/dlls/shdocvw/tests/ie.c
index e7b5ead..336a62e 100644
--- a/dlls/shdocvw/tests/ie.c
+++ b/dlls/shdocvw/tests/ie.c
@@ -27,6 +27,28 @@
 #include "ole2.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)
 {
     IWebBrowser2 *wb;
@@ -44,6 +66,8 @@ static void test_InternetExplorer(void)
     hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
     ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres);
 
+    test_visible(wb);
+
     IWebBrowser2_Release(wb);
     ref = IUnknown_Release(unk);
     ok(!ref, "object not destroyed, ref=%u\n", ref);




More information about the wine-cvs mailing list