]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/wince/textctrlce.cpp
Backed-out PNG8 patch (no time to look at why
[wxWidgets.git] / src / msw / wince / textctrlce.cpp
index 86f6c7d248f8fde208cb3b0c363287efbc1f8e5f..2732c41a99492d7c842314d1c1c15ac0aa92d6e5 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Name:        src/msw/wince/textctrlce.cpp
-// Purpose:     wxTextCtrl implementation for Smartphones
+// Purpose:     wxTextCtrl implementation for smart phones driven by WinCE
 // Author:      Wlodzimierz ABX Skiba
 // Modified by:
 // Created:     30.08.2004
@@ -40,7 +40,7 @@
 #include "wx/msw/missing.h"
 #include "wx/msw/winundef.h"
 
-#if wxUSE_TEXTCTRL && defined(__SMARTPHONE__)
+#if wxUSE_TEXTCTRL && defined(__SMARTPHONE__) && defined(__WXWINCE__)
 
 #define GetBuddyHwnd()      (HWND)(m_hwndBuddy)
 
@@ -1040,40 +1040,6 @@ 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
-    )
-{
-#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);
-
-    return (WXHBRUSH)brush->GetResourceHandle();
-}
-
 bool wxTextCtrl::AdjustSpaceLimit()
 {
     unsigned int limit = ::SendMessage(GetBuddyHwnd(), EM_GETLIMITTEXT, 0, 0);
@@ -1250,4 +1216,4 @@ void wxTextCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event))
     }
 }
 
-#endif // wxUSE_TEXTCTRL && __SMARTPHONE__
+#endif // wxUSE_TEXTCTRL && __SMARTPHONE__ && __WXWINCE__