>From 9135ec74cc9bbc9572dbaf00cea4bc608bb66f75 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 13 Jan 2012 15:21:42 +1100
Subject: [PATCH] Return correct background color
To: wine-patches <wine-patches@winehq.org>

---
 dlls/comctl32/tests/treeview.c |    2 +-
 dlls/comctl32/treeview.c       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index c99d480..9a523d5 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -635,7 +635,7 @@ static void test_get_set_bkcolor(void)
 
     /* If the value is -1, the control is using the system color for the background color. */
     crColor = (COLORREF)SendMessage( hTree, TVM_GETBKCOLOR, 0, 0 );
-    ok(crColor == ~0u, "Default background color reported as 0x%.8x\n", crColor);
+    ok(crColor == RGB(0xff,0xff,0xff), "Default background color reported as 0x%.8x\n", crColor);
 
     /* Test for black background */
     SendMessage( hTree, TVM_SETBKCOLOR, 0, RGB(0,0,0) );
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index c5f3bb3..02437a9 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -1978,7 +1978,7 @@ static LRESULT
 TREEVIEW_GetBkColor(const TREEVIEW_INFO *infoPtr)
 {
     TRACE("\n");
-    return (LRESULT)infoPtr->clrBk;
+    return (LRESULT)GETBKCOLOR(infoPtr->clrBk);
 }
 
 static LRESULT
-- 
1.7.5.4

