]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
minor changes (fixing crash on mouse click)
[wxWidgets.git] / src / msw / textctrl.cpp
index e2d8369a0406175a384cb579fef2c407be43750e..6e3d88dc59b5cd7d1c89a84843c2d1ed332cb5dc 100644 (file)
@@ -1183,17 +1183,23 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
 
 void wxTextCtrl::AdjustSpaceLimit()
 {
+#ifndef __WIN16__
     unsigned int len = ::GetWindowTextLength(GetHwnd()),
     limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0);
     if ( len > limit )
     {
         limit = len + 0x8000;    // 32Kb
 
+#if wxUSE_RICHEDIT
         if ( m_isRich || limit > 0xffff )
+#else
+        if ( limit > 0xffff )
+#endif
             ::SendMessage(GetHwnd(), EM_LIMITTEXT, 0, limit);
         else
             ::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
     }
+#endif
 }
 
 // For Rich Edit controls. Do we need it?