]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Added licence line
[wxWidgets.git] / src / msw / textctrl.cpp
index 113994facce2382911e21a744c1624f0e183c8aa..6cbd982bc684e6faa740111205d32068e8a8bf13 100644 (file)
@@ -1856,38 +1856,12 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
     return true;
 }
 
-WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
-#if wxUSE_CTL3D
-                               WXUINT message,
-                               WXWPARAM wParam,
-                               WXLPARAM lParam
-#else
-                               WXUINT WXUNUSED(message),
-                               WXWPARAM WXUNUSED(wParam),
-                               WXLPARAM WXUNUSED(lParam)
-#endif
-    )
+WXHBRUSH wxTextCtrl::MSWControlColor(WXHDC hDC)
 {
-#if wxUSE_CTL3D
-    if ( m_useCtl3D )
-    {
-        HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);
-        return (WXHBRUSH) hbrush;
-    }
-#endif // wxUSE_CTL3D
-
-    HDC hdc = (HDC)pDC;
-    wxColour colBack = GetBackgroundColour();
-
-    if (!IsEnabled() && (GetWindowStyle() & wxTE_MULTILINE) == 0)
-        colBack = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
-
-    ::SetBkColor(hdc, wxColourToRGB(colBack));
-    ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour()));
-
-    wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID);
+    if ( !IsEnabled() && !HasFlag(wxTE_MULTILINE) )
+        return MSWControlColorDisabled(hDC);
 
-    return (WXHBRUSH)brush->GetResourceHandle();
+    return wxTextCtrlBase::MSWControlColorSolid(hDC);
 }
 
 bool wxTextCtrl::AdjustSpaceLimit()