From 903f1b0d80ed58ff7c0eb9e61e448640e3c214f4 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 3 May 2005 16:17:17 +0000 Subject: [PATCH] A control's text colour now reflects the system colour setting. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/msw/control.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 5e712b3e0a..cbc3cf5218 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -26,6 +26,7 @@ wxMSW: - Worked around an apparent bug in deferred window positioning (moving a window from (x, y) to (a, b) and back to (x, y) misses the last step) by checking window positions against corresponding sizer state, if any. +- A control's text colour now reflects the system colour setting. wxMac: diff --git a/src/msw/control.cpp b/src/msw/control.cpp index d0395958a3..ce27473f21 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -339,6 +339,10 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd) { ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); } + else + { + ::SetTextColor(hdc, ::GetSysColor(COLOR_WINDOWTEXT)); + } WXHBRUSH hbr = 0; if ( !colBg.Ok() ) -- 2.45.2