shell32: Add a test for ABM_GETTASKBARPOS.

This commit is contained in:
Huw Davies 2008-03-05 12:31:25 +00:00 committed by Alexandre Julliard
parent b24ec72f89
commit f372280928
2 changed files with 17 additions and 1 deletions

View File

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

View File

@ -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;
}