Commit 3e3a2be8 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleacc: Add Window_OleWindow_GetWindow implementation.

parent 1a3db363
......@@ -1039,8 +1039,8 @@ static void test_default_client_accessible_object(void)
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IOleWindow, (void**)&ow);
ok(hr == S_OK, "got %x\n", hr);
hr = IOleWindow_GetWindow(ow, &hwnd2);
todo_wine ok(hr == S_OK, "got %x\n", hr);
todo_wine ok(btn == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, btn);
ok(hr == S_OK, "got %x\n", hr);
ok(btn == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, btn);
IOleWindow_Release(ow);
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&win);
......@@ -1064,8 +1064,8 @@ static void test_default_client_accessible_object(void)
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IOleWindow, (void**)&ow);
ok(hr == S_OK, "got %x\n", hr);
hr = IOleWindow_GetWindow(ow, &hwnd2);
todo_wine ok(hr == S_OK, "got %x\n", hr);
todo_wine ok(chld == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, chld);
ok(hr == S_OK, "got %x\n", hr);
ok(chld == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, chld);
IOleWindow_Release(ow);
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&win);
......@@ -1088,8 +1088,8 @@ static void test_default_client_accessible_object(void)
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IOleWindow, (void**)&ow);
ok(hr == S_OK, "got %x\n", hr);
hr = IOleWindow_GetWindow(ow, &hwnd2);
todo_wine ok(hr == S_OK, "got %x\n", hr);
todo_wine ok(chld2 == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, chld2);
ok(hr == S_OK, "got %x\n", hr);
ok(chld2 == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, chld2);
IOleWindow_Release(ow);
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&win);
......
......@@ -31,6 +31,8 @@ typedef struct {
IEnumVARIANT IEnumVARIANT_iface;
LONG ref;
HWND hwnd;
} Window;
static inline Window* impl_from_Window(IAccessible *iface)
......@@ -327,11 +329,14 @@ static ULONG WINAPI Window_OleWindow_Release(IOleWindow *iface)
return IAccessible_Release(&This->IAccessible_iface);
}
static HRESULT WINAPI Window_OleWindow_GetWindow(IOleWindow *iface, HWND *phwnd)
static HRESULT WINAPI Window_OleWindow_GetWindow(IOleWindow *iface, HWND *hwnd)
{
Window *This = impl_from_Window_OleWindow(iface);
FIXME("(%p)->(%p)\n", This, phwnd);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, hwnd);
*hwnd = This->hwnd;
return S_OK;
}
static HRESULT WINAPI Window_OleWindow_ContextSensitiveHelp(IOleWindow *iface, BOOL fEnterMode)
......@@ -427,6 +432,7 @@ HRESULT create_window_object(HWND hwnd, const IID *iid, void **obj)
window->IOleWindow_iface.lpVtbl = &WindowOleWindowVtbl;
window->IEnumVARIANT_iface.lpVtbl = &WindowEnumVARIANTVtbl;
window->ref = 1;
window->hwnd = hwnd;
hres = IAccessible_QueryInterface(&window->IAccessible_iface, iid, obj);
IAccessible_Release(&window->IAccessible_iface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment