[PATCH 2/2] comctl32/tests: Default listview width appears to be 1 inch.

Austin Lund austin.lund at gmail.com
Wed Sep 22 01:28:31 CDT 2010


---
 dlls/comctl32/tests/listview.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 4297e0b..3f02f6b 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -3269,6 +3269,7 @@ static void test_getitemrect(void)
     LVCOLUMNA col;
     INT order[2];
     POINT pt;
+    HDC hdc;
 
     /* rectangle isn't empty for empty text items */
     hwnd = create_listview_control(LVS_LIST);
@@ -3282,7 +3283,9 @@ static void test_getitemrect(void)
     expect(TRUE, r);
     expect(0, rect.left);
     expect(0, rect.top);
-    todo_wine expect(96, rect.right);
+    hdc = GetDC(hwnd);
+    todo_wine expect(GetDeviceCaps(hdc, LOGPIXELSX), rect.right);
+    ReleaseDC(hwnd, hdc);
     DestroyWindow(hwnd);
 
     hwnd = create_listview_control(LVS_REPORT);
@@ -4110,6 +4113,7 @@ static void test_getcolumnwidth(void)
     DWORD_PTR style;
     LVCOLUMNA col;
     LVITEMA itema;
+    HDC hdc;
 
     /* default column width */
     hwnd = create_listview_control(LVS_ICON);
@@ -4133,7 +4137,9 @@ static void test_getcolumnwidth(void)
     memset(&itema, 0, sizeof(itema));
     SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&itema);
     ret = SendMessage(hwnd, LVM_GETCOLUMNWIDTH, 0, 0);
-    todo_wine expect(96, ret);
+    hdc = GetDC(hwnd);
+    todo_wine expect(GetDeviceCaps(hdc, LOGPIXELSX), ret);
+    ReleaseDC(hwnd, hdc);
     DestroyWindow(hwnd);
 }
 
-- 
1.7.0.4




More information about the wine-patches mailing list