[2/2] comctl32/listview: Fix LVM_GETCOLUMNORDERARRAY passing message to header

Nikolay Sivov bunglehead at gmail.com
Fri Apr 24 06:10:15 CDT 2009


Changelog:
    - Fix LVM_GETCOLUMNORDERARRAY passing message to header

>From b3affa781f78b4becc50237756ada2608f76e1fb Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Fri, 24 Apr 2009 14:59:35 +0400
Subject: Fix LVM_GETCOLUMNORDERARRAY passing message to header

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

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index c6a06c7..2aed87e 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -5375,16 +5375,12 @@ static BOOL LISTVIEW_GetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn, LPLVC
 
 static BOOL LISTVIEW_GetColumnOrderArray(const LISTVIEW_INFO *infoPtr, INT iCount, LPINT lpiArray)
 {
-    INT i;
+    TRACE("iCount=%d, lpiArray=%p\n", iCount, lpiArray);
 
     if (!lpiArray)
 	return FALSE;
 
-    /* FIXME: little hack */
-    for (i = 0; i < iCount; i++)
-	lpiArray[i] = i;
-
-    return TRUE;
+    return SendMessageW(infoPtr->hwndHeader, HDM_GETORDERARRAY, iCount, (LPARAM)lpiArray);
 }
 
 /***
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 1612171..5d40546 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -850,7 +850,7 @@ static void test_columns(void)
     ok(order[0] == 0, "Expected order 0, got %d\n", order[0]);
     ok(order[1] == 1, "Expected order 1, got %d\n", order[1]);
 
-    ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", TRUE);
+    ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", FALSE);
 
     DestroyWindow(hwnd);
 }
-- 
1.5.6.5





More information about the wine-patches mailing list