Commit f3722809 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

shell32: Add a test for ABM_GETTASKBARPOS.

parent b24ec72f
......@@ -882,7 +882,7 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
int height=data->rc.bottom - data->rc.top;
RECT rec=data->rc;
TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n",
FIXME("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}: stub\n",
msg, data->cbSize, data->hWnd, data->uCallbackMessage, data->uEdge,
wine_dbgstr_rect(&data->rc), data->lParam);
......@@ -891,6 +891,8 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
case ABM_GETSTATE:
return ABS_ALWAYSONTOP | ABS_AUTOHIDE;
case ABM_GETTASKBARPOS:
/* FIXME: This is wrong. It should return the taskbar co-ords and edge from the monitor
which contains data->hWnd */
GetWindowRect(data->hWnd, &rec);
data->rc=rec;
return TRUE;
......
......@@ -79,6 +79,7 @@ static void test_SHAppBarMessage(void)
{
APPBARDATA abd;
HWND hwnd, foregnd;
UINT_PTR ret;
memset(&abd, 0xcc, sizeof(abd));
abd.cbSize = sizeof(abd);
......@@ -106,6 +107,19 @@ static void test_SHAppBarMessage(void)
}
}
memset(&abd, 0xcc, sizeof(abd));
abd.cbSize = sizeof(abd);
ret = SHAppBarMessage(ABM_GETTASKBARPOS, &abd);
if(ret)
{
ok(abd.hWnd == (HWND)0xcccccccc, "hWnd overwritten\n");
todo_wine
{
ok(abd.uEdge >= ABE_LEFT && abd.uEdge <= ABE_BOTTOM, "uEdge not returned\n");
ok(abd.rc.left != 0xcccccccc, "rc not updated\n");
}
}
return;
}
......
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