Huw Davies : shell32: Add a test for ABM_GETTASKBARPOS.

Alexandre Julliard julliard at winehq.org
Wed Mar 5 13:41:15 CST 2008


Module: wine
Branch: master
Commit: f372280928f587ad4e1228c499bbfffde3b9cea9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f372280928f587ad4e1228c499bbfffde3b9cea9

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Mar  5 12:31:25 2008 +0000

shell32: Add a test for ABM_GETTASKBARPOS.

---

 dlls/shell32/shell32_main.c  |    4 +++-
 dlls/shell32/tests/systray.c |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index ac9019a..4c2735b 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -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;
diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c
index f1cd62b..f7fc747 100644
--- a/dlls/shell32/tests/systray.c
+++ b/dlls/shell32/tests/systray.c
@@ -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;
 }
 




More information about the wine-cvs mailing list