Module: wine Branch: master Commit: bd95cb54041e9dace1d0fe4b01e56d69ed7f9391 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bd95cb54041e9dace1d0fe4b01...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Feb 24 13:03:24 2014 +0100
wmp: Added DoVerb(OLEIVERB_HIDE) implementation.
---
dlls/wmp/oleobj.c | 10 ++++++++++ dlls/wmp/tests/oleobj.c | 4 ++++ 2 files changed, 14 insertions(+)
diff --git a/dlls/wmp/oleobj.c b/dlls/wmp/oleobj.c index 29f39d7..3dd2378 100644 --- a/dlls/wmp/oleobj.c +++ b/dlls/wmp/oleobj.c @@ -396,6 +396,16 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms case OLEIVERB_INPLACEACTIVATE: TRACE("(%p)->(OLEIVERB_INPLACEACTIVATE)\n", This); return activate_inplace(This); + + case OLEIVERB_HIDE: + if(!This->hwnd) { + FIXME("No window to hide\n"); + return E_UNEXPECTED; + } + + ShowWindow(This->hwnd, SW_HIDE); + return S_OK; + default: FIXME("Unsupported iVerb %d\n", iVerb); } diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c index 52110c1..9e27d3b 100644 --- a/dlls/wmp/tests/oleobj.c +++ b/dlls/wmp/tests/oleobj.c @@ -926,6 +926,10 @@ static void test_wmp(void)
test_window(hwnd);
+ hres = IOleObject_DoVerb(oleobj, OLEIVERB_HIDE, NULL, &ClientSite, 0, container_hwnd, &pos); + ok(hres == S_OK, "DoVerb failed: %08x\n", hres); + ok(!IsWindowVisible(hwnd), "Window is visible\n"); + SET_EXPECT(OnShowWindow_FALSE); SET_EXPECT(OnInPlaceDeactivate); hres = IOleObject_Close(oleobj, 0);