wmp: Added SetObjectRects implementation.

This commit is contained in:
Jacek Caban 2014-02-24 13:03:37 +01:00 committed by Alexandre Julliard
parent bd95cb5404
commit ca589fc1e5
2 changed files with 19 additions and 2 deletions

View File

@ -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)

View File

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