}
else
{
- ENTRYFDATA* pEfd;
+ ENTRYFDATA Efd;
WNDPARAMS vParams;
vParams.fsStatus = WPM_CBCTLDATA;
+ vParams.pCtlData = &Efd;
vParams.cbCtlData = sizeof(ENTRYFDATA);
if (::WinSendMsg( GetHwnd()
,&vParams
,0
))
- {
- pEfd = (ENTRYFDATA*)vParams.pCtlData;
- uLimit = (unsigned int)pEfd->cchEditLimit;
- }
+ uLimit = (unsigned int)Efd.cchEditLimit;
else
uLimit = 32; //PM's default
}
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