]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
more things to ignore
[wxWidgets.git] / src / msw / textctrl.cpp
index 55e3e77492451babc8e3e8348e8e761c62021761..5cc8e00a8221d666d210abe1bf55e142a0d1d816 100644 (file)
@@ -57,7 +57,7 @@
 #   include <fstream>
 #endif
 
-#if wxUSE_RICHEDIT && !defined(__GNUWIN32__)
+#if wxUSE_RICHEDIT && (!defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS))
     #include <richedit.h>
 #endif
 
@@ -112,7 +112,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
                         const wxString& name)
 {
     // base initialization
-    if ( !CreateBase(parent, id, pos, size, style, name) )
+    if ( !CreateBase(parent, id, pos, size, style, validator, name) )
         return FALSE;
 
     SetValidator(validator);
@@ -131,12 +131,17 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
                       _T("wxTE_PROCESS_ENTER style is ignored for multiline "
                          "text controls (they always process it)") );
 
-        msStyle |= ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL;
+        msStyle |= ES_MULTILINE | ES_WANTRETURN;
+        if ((m_windowStyle & wxTE_NO_VSCROLL) == 0)
+            msStyle |= WS_VSCROLL;
         m_windowStyle |= wxTE_PROCESS_ENTER;
     }
     else
         msStyle |= ES_AUTOHSCROLL;
 
+    if (m_windowStyle & wxHSCROLL)
+        msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL);
+
     if (m_windowStyle & wxTE_READONLY)
         msStyle |= ES_READONLY;
 
@@ -164,10 +169,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
     const wxChar *windowClass = _T("EDIT");
 
 #if wxUSE_RICHEDIT
-    // multiline edit controls are RICHEDITs except for those which have a
-    // simple border (VZ: why??)
-    if ( (m_windowStyle & wxTE_MULTILINE) &&
-         !(m_windowStyle & wxSIMPLE_BORDER) )
+    if ( m_windowStyle & wxTE_RICH )
     {
         msStyle |= ES_AUTOVSCROLL;
         m_isRich = TRUE;