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

mshtml: Added IHTMLScreen::get_availWidth implementation.

parent aa93ed5e
...@@ -200,8 +200,15 @@ static HRESULT WINAPI HTMLScreen_get_availHeight(IHTMLScreen *iface, LONG *p) ...@@ -200,8 +200,15 @@ static HRESULT WINAPI HTMLScreen_get_availHeight(IHTMLScreen *iface, LONG *p)
static HRESULT WINAPI HTMLScreen_get_availWidth(IHTMLScreen *iface, LONG *p) static HRESULT WINAPI HTMLScreen_get_availWidth(IHTMLScreen *iface, LONG *p)
{ {
HTMLScreen *This = impl_from_IHTMLScreen(iface); HTMLScreen *This = impl_from_IHTMLScreen(iface);
FIXME("(%p)->(%p)\n", This, p); RECT work_area;
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
if(!SystemParametersInfoW(SPI_GETWORKAREA, 0, &work_area, 0))
return E_FAIL;
*p = work_area.right-work_area.left;
return S_OK;
} }
static HRESULT WINAPI HTMLScreen_get_fontSmoothingEnabled(IHTMLScreen *iface, VARIANT_BOOL *p) static HRESULT WINAPI HTMLScreen_get_fontSmoothingEnabled(IHTMLScreen *iface, VARIANT_BOOL *p)
......
...@@ -3973,6 +3973,11 @@ static void test_screen(IHTMLWindow2 *window) ...@@ -3973,6 +3973,11 @@ static void test_screen(IHTMLWindow2 *window)
ok(hres == S_OK, "get_availHeight failed: %08x\n", hres); ok(hres == S_OK, "get_availHeight failed: %08x\n", hres);
ok(l == work_area.bottom-work_area.top, "availHeight = %d, expected %d\n", l, work_area.bottom-work_area.top); ok(l == work_area.bottom-work_area.top, "availHeight = %d, expected %d\n", l, work_area.bottom-work_area.top);
l = 0xdeadbeef;
hres = IHTMLScreen_get_availWidth(screen, &l);
ok(hres == S_OK, "get_availWidth failed: %08x\n", hres);
ok(l == work_area.right-work_area.left, "availWidth = %d, expected %d\n", l, work_area.right-work_area.left);
IHTMLScreen_Release(screen); IHTMLScreen_Release(screen);
} }
......
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