mshtml: Added IHTMLScreen::get_height implementation.

This commit is contained in:
Jacek Caban 2009-11-30 17:57:56 +01:00 committed by Alexandre Julliard
parent ca54be2cc6
commit fd24068c8f
2 changed files with 11 additions and 3 deletions

View File

@ -158,8 +158,11 @@ static HRESULT WINAPI HTMLScreen_get_width(IHTMLScreen *iface, LONG *p)
static HRESULT WINAPI HTMLScreen_get_height(IHTMLScreen *iface, LONG *p)
{
HTMLScreen *This = HTMLSCREEN_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
*p = GetDeviceCaps(get_display_dc(), VERTRES);
return S_OK;
}
static HRESULT WINAPI HTMLScreen_put_updateInterval(IHTMLScreen *iface, LONG v)

View File

@ -3058,12 +3058,17 @@ static void test_screen(IHTMLWindow2 *window)
hdc = CreateICW(displayW, NULL, NULL, NULL);
exl = GetDeviceCaps(hdc, HORZRES);
l = 0xdeadbeef;
hres = IHTMLScreen_get_width(screen, &l);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
ok(l == exl, "width = %d, expected %d\n", l, exl);
exl = GetDeviceCaps(hdc, VERTRES);
l = 0xdeadbeef;
hres = IHTMLScreen_get_height(screen, &l);
ok(hres == S_OK, "get_height failed: %08x\n", hres);
ok(l == exl, "height = %d, expected %d\n", l, exl);
DeleteObject(hdc);
IHTMLScreen_Release(screen);