Nikolay Sivov : comctl32/listview: Fix LVM_GETCOLUMNORDERARRAY passing message to header.

Alexandre Julliard julliard at winehq.org
Fri Apr 24 10:00:11 CDT 2009


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Fri Apr 24 14:59:35 2009 +0400

comctl32/listview: 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);
 }




More information about the wine-cvs mailing list