From ef8642862450ff846299b8e56d7b0cbce9d5f79d Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Mon, 26 Sep 2005 19:24:43 +0000 Subject: [PATCH] In GetTextColour, use GetDefaultAttributes instead of ListView_GetTextColor because the latter seems to return black all the time (instead of the theme color) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 1771e0ea3f..b24b99daf0 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1115,9 +1115,9 @@ int wxListCtrl::GetSelectedItemCount() const // Gets the text colour of the listview wxColour wxListCtrl::GetTextColour() const { - COLORREF ref = ListView_GetTextColor(GetHwnd()); - wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref)); - return col; + // Use GetDefaultAttributes instead of ListView_GetTextColor because + // the latter seems to return black all the time (instead of the theme color) + return GetDefaultAttributes().colFg; } // Sets the text colour of the listview