X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/789295bf7bd4b58b0270800fb689fce0786dae15..02fe546f1fe77a53b6de70a663113a9e22c1ccf4:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index e2d8369a04..6e3d88dc59 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -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?