Jacek Caban : wmp: Added SetObjectRects implementation.

Alexandre Julliard julliard at winehq.org
Mon Feb 24 15:42:31 CST 2014


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 24 13:03:37 2014 +0100

wmp: Added SetObjectRects implementation.

---

 dlls/wmp/oleobj.c       |   12 ++++++++++--
 dlls/wmp/tests/oleobj.c |    9 +++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/dlls/wmp/oleobj.c b/dlls/wmp/oleobj.c
index 3dd2378..c081bf8 100644
--- a/dlls/wmp/oleobj.c
+++ b/dlls/wmp/oleobj.c
@@ -596,8 +596,16 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjec
         LPCRECT lprcPosRect, LPCRECT lprcClipRect)
 {
     WindowsMediaPlayer *This = impl_from_IOleInPlaceObjectWindowless(iface);
-    FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%s %s)\n", This, wine_dbgstr_rect(lprcPosRect), wine_dbgstr_rect(lprcClipRect));
+
+    if(This->hwnd) {
+       SetWindowPos(This->hwnd, NULL, lprcPosRect->left, lprcPosRect->top,
+               lprcPosRect->right-lprcPosRect->left, lprcPosRect->bottom-lprcPosRect->top,
+               SWP_NOZORDER | SWP_NOACTIVATE);
+    }
+
+    return S_OK;
 }
 
 static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c
index 9e27d3b..e57913d 100644
--- a/dlls/wmp/tests/oleobj.c
+++ b/dlls/wmp/tests/oleobj.c
@@ -926,6 +926,15 @@ static void test_wmp(void)
 
     test_window(hwnd);
 
+    pos.left = 1;
+    pos.top = 2;
+    pos.right = 301;
+    pos.bottom = 312;
+    hres = IOleInPlaceObject_SetObjectRects(ipobj, &pos, &pos);
+    ok(hres == S_OK, "SetObjectRects failed: %08x\n", hres);
+    GetClientRect(hwnd, &pos);
+    test_rect_size(&pos, 300, 310);
+
     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");




More information about the wine-cvs mailing list