msscript.ocx: Implement IScriptControl::put_SitehWnd.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-09-03 17:50:22 +03:00 committed by Alexandre Julliard
parent 8b6afc2677
commit 01ea797c34
2 changed files with 7 additions and 2 deletions

View file

@ -165,6 +165,7 @@ struct ScriptControl {
IConnectionPointContainer IConnectionPointContainer_iface;
LONG ref;
IOleClientSite *site;
HWND site_hwnd;
SIZEL extent;
LONG timeout;
VARIANT_BOOL allow_ui;
@ -2751,8 +2752,12 @@ static HRESULT WINAPI ScriptControl_put_SitehWnd(IScriptControl *iface, LONG hwn
{
ScriptControl *This = impl_from_IScriptControl(iface);
FIXME("(%p)->(%x)\n", This, hwnd);
TRACE("(%p)->(%x)\n", This, hwnd);
if (hwnd && !IsWindow(LongToHandle(hwnd)))
return CTL_E_INVALIDPROPERTYVALUE;
This->site_hwnd = LongToHandle(hwnd);
return S_OK;
}

View file

@ -1929,7 +1929,7 @@ static void test_SitehWnd(void)
todo_wine ok(!site_hwnd, "got %p\n", (HWND)(LONG_PTR)site_hwnd);
hr = IScriptControl_put_SitehWnd(sc, 1);
todo_wine ok(hr == CTL_E_INVALIDPROPERTYVALUE, "got 0x%08x\n", hr);
ok(hr == CTL_E_INVALIDPROPERTYVALUE, "got 0x%08x\n", hr);
site_hwnd = 0xdeadbeef;
hr = IScriptControl_get_SitehWnd(sc, &site_hwnd);