]> git.saurik.com Git - wxWidgets.git/commitdiff
Bugfix.
authorStefan Neis <Stefan.Neis@t-online.de>
Sun, 14 Dec 2003 13:13:53 +0000 (13:13 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 14 Dec 2003 13:13:53 +0000 (13:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/textctrl.cpp

index 8ccbe4d59fc47ae9209096e6028b0ce1f33208e6..0f801323ef68f160055151ee297fa7865de26428 100644 (file)
@@ -1154,10 +1154,11 @@ void wxTextCtrl::AdjustSpaceLimit()
     }
     else
     {
-        ENTRYFDATA*                 pEfd;
+        ENTRYFDATA                  Efd;
         WNDPARAMS                   vParams;
 
         vParams.fsStatus = WPM_CBCTLDATA;
+       vParams.pCtlData = &Efd;
         vParams.cbCtlData = sizeof(ENTRYFDATA);
 
         if (::WinSendMsg( GetHwnd()
@@ -1165,10 +1166,7 @@ void wxTextCtrl::AdjustSpaceLimit()
                          ,&vParams
                          ,0
                         ))
-        {
-            pEfd = (ENTRYFDATA*)vParams.pCtlData;
-            uLimit = (unsigned int)pEfd->cchEditLimit;
-        }
+            uLimit = (unsigned int)Efd.cchEditLimit;
         else
             uLimit = 32; //PM's default
     }
@@ -1182,7 +1180,7 @@ void wxTextCtrl::AdjustSpaceLimit()
         if (m_bIsMLE)
             ::WinSendMsg(GetHwnd(), MLM_SETTEXTLIMIT, MPFROMLONG(uLimit), 0);
         else
-            ::WinSendMsg(GetHwnd(), EM_SETTEXTLIMIT, MPFROMLONG(uLimit), 0);
+            ::WinSendMsg(GetHwnd(), EM_SETTEXTLIMIT, MPFROMSHORT(uLimit), 0);
     }
 } // end of wxTextCtrl::AdjustSpaceLimit