+ ::WinSendMsg(GetHwnd(), MLM_SETSEL, (MPARAM)lIndex, (MPARAM)lIndex);
+ ::WinSendMsg(GetHwnd(), MLM_SETIMPORTEXPORT, MPFROMP(zBuf), MPFROMSHORT((USHORT)sizeof(zBuf)));
+ lBuflen = (long)::WinSendMsg(GetHwnd(), MLM_QUERYFORMATTEXTLENGTH, MPFROMLONG(lIndex), MPFROMLONG(-1));
+ lCopied = (long)::WinSendMsg(GetHwnd(), MLM_EXPORT, MPFROMP(&lIndex), MPFROMP(&lBuflen));
+ zBuf[lCopied] = '\0';
+ }
+ else
+ {
+ WNDPARAMS vParams;
+
+ vParams.fsStatus = WPM_CCHTEXT;
+ if (::WinSendMsg( GetHwnd()
+ ,WM_QUERYWINDOWPARAMS
+ ,&vParams
+ ,0
+ ))
+ memcpy(zBuf, vParams.pszText, vParams.cchText);
+ zBuf[vParams.cchText] = '\0';
+ }
+ sStr = zBuf;
+ delete [] zBuf;
+ return sStr;
+} // end of wxTextCtrl::GetLineText