From: Jacek Caban Subject: ieframe: Added InternetExplore::get_HWND implementation. Message-Id: <537B8341.5080507@codeweavers.com> Date: Tue, 20 May 2014 18:30:57 +0200 --- dlls/ieframe/ie.c | 7 +++++-- dlls/ieframe/tests/ie.c | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/ieframe/ie.c b/dlls/ieframe/ie.c index 454eb0f..5eb1d26 100644 --- a/dlls/ieframe/ie.c +++ b/dlls/ieframe/ie.c @@ -358,8 +358,11 @@ static HRESULT WINAPI InternetExplorer_get_Name(IWebBrowser2 *iface, BSTR *Name) static HRESULT WINAPI InternetExplorer_get_HWND(IWebBrowser2 *iface, SHANDLE_PTR *pHWND) { InternetExplorer *This = impl_from_IWebBrowser2(iface); - FIXME("(%p)->(%p)\n", This, pHWND); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, pHWND); + + *pHWND = (SHANDLE_PTR)This->frame_hwnd; + return S_OK; } static HRESULT WINAPI InternetExplorer_get_FullName(IWebBrowser2 *iface, BSTR *FullName) diff --git a/dlls/ieframe/tests/ie.c b/dlls/ieframe/tests/ie.c index daf47f7..9ddd25c 100644 --- a/dlls/ieframe/tests/ie.c +++ b/dlls/ieframe/tests/ie.c @@ -205,6 +205,22 @@ static void test_html_window(IWebBrowser2 *wb) IHTMLWindow2_Release(html_window); } +static void test_window(IWebBrowser2 *wb) +{ + SHANDLE_PTR handle = 0; + HWND hwnd = NULL; + char buf[100]; + HRESULT hres; + + hres = IWebBrowser2_get_HWND(wb, &handle); + ok(hres == S_OK, "get_HWND faile: %08x\n", hres); + ok(handle, "handle == 0\n"); + + hwnd = (HWND)handle; + GetClassNameA(hwnd, buf, sizeof(buf)); + ok(!strcmp(buf, "IEFrame"), "Unexpected class name %s\n", buf); +} + static void test_navigate(IWebBrowser2 *wb, const char *url) { VARIANT urlv, emptyv; @@ -249,6 +265,7 @@ static void test_InternetExplorer(void) test_visible(wb); test_html_window(wb); + test_window(wb); test_navigate(wb, "http://test.winehq.org/tests/hello.html"); advise_cp(unk, FALSE);