Commit ca589fc1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wmp: Added SetObjectRects implementation.

parent bd95cb54
......@@ -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)
......
......@@ -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");
......
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