X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b82138efe9aacda4e0ad7ce4b1551d624524c4..f5cd97870d58ebf1fa2267299f80b864281884c6:/include/wx/msw/textctrl.h?ds=sidebyside

diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h
index 3e66b4a49e..f233ee08f6 100644
--- a/include/wx/msw/textctrl.h
+++ b/include/wx/msw/textctrl.h
@@ -16,13 +16,6 @@
     #pragma interface "textctrl.h"
 #endif
 
-// can we use RICHEDIT class for wxTextCtrl implementation?
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__WXWINE__)
-    #define wxUSE_RICHEDIT 1
-#else
-    #define wxUSE_RICHEDIT 0
-#endif
-
 class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase
 {
 public:
@@ -88,7 +81,7 @@ public:
     // considering all its contents as a single strings) and (x, y) coordinates
     // which represent column and line.
     virtual long XYToPosition(long x, long y) const;
-    virtual void PositionToXY(long pos, long *x, long *y) const;
+    virtual bool PositionToXY(long pos, long *x, long *y) const;
 
     virtual void ShowPosition(long pos);
 
@@ -122,15 +115,24 @@ public:
 
     virtual void Command(wxCommandEvent& event);
     virtual bool MSWCommand(WXUINT param, WXWORD id);
+    virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
+            WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
+
+    // In WIN16, need to override normal erasing because
+    // Ctl3D doesn't use the wxWindows background colour.
+#ifdef __WIN16__
+    void OnEraseBackground(wxEraseEvent& event);
+#endif
 
 #if wxUSE_RICHEDIT
     bool IsRich() const { return m_isRich; }
     void SetRichEdit(bool isRich) { m_isRich = isRich; }
-#endif // wxUSE_RICHEDIT
 
-    virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
-                                WXUINT message, WXWPARAM wParam,
-                                WXLPARAM lParam);
+    // rich edit controls are not compatible with normal ones and wem ust set
+    // the colours for them otherwise
+    virtual bool SetBackgroundColour(const wxColour& colour);
+    virtual bool SetForegroundColour(const wxColour& colour);
+#endif // wxUSE_RICHEDIT
 
     virtual void AdoptAttributesFromHWND();
     virtual void SetupColours();
@@ -162,7 +164,7 @@ protected:
     // limit is big enough)
     void AdjustSpaceLimit();
 
-    virtual wxSize DoGetBestSize();
+    virtual wxSize DoGetBestSize() const;
 
 private:
     DECLARE_EVENT_TABLE()