X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d598bae33dff0e48eebd569aa3d75e95e8d6947..3bf93e1e9ac6b61e5220967d2ada2d4faec4dd9c:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index d315a58b5c..f02d4af9db 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -354,7 +354,7 @@ void wxTextCtrl::SetValue( // if ((rsValue.length() > 0x400) || (rsValue != GetValue())) { - ::WinSetWindowText(GetHwnd(), rsValue.c_str()); + ::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str()); AdjustSpaceLimit(); } } // end of wxTextCtrl::SetValue @@ -366,7 +366,7 @@ void wxTextCtrl::WriteText( if (m_bIsMLE) ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM((PCHAR)rsValue.c_str()), MPARAM(0)); else - ::WinSetWindowText(GetHwnd(), rsValue.c_str()); + ::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str()); AdjustSpaceLimit(); } // end of wxTextCtrl::WriteText @@ -884,14 +884,14 @@ wxString wxTextCtrl::GetLineText( { long lLen = (long)GetLineLength((long)lLineNo) + 1; wxString sStr; - char* zBuf; + wxChar* zBuf; // // There must be at least enough place for the length WORD in the // buffer // lLen += sizeof(WORD); - zBuf = new char[lLen]; + zBuf = new wxChar[lLen]; if (m_bIsMLE) { long lIndex; @@ -902,7 +902,7 @@ wxString wxTextCtrl::GetLineText( lIndex = lLen * lLineNo; ::WinSendMsg(GetHwnd(), MLM_SETSEL, (MPARAM)lIndex, (MPARAM)lIndex); - ::WinSendMsg(GetHwnd(), MLM_SETIMPORTEXPORT, MPFROMP(zBuf), MPFROMSHORT((USHORT)sizeof(zBuf))); + ::WinSendMsg(GetHwnd(), MLM_SETIMPORTEXPORT, MPFROMP(zBuf), MPFROMSHORT((USHORT)WXSIZEOF(zBuf))); lBuflen = (long)::WinSendMsg(GetHwnd(), MLM_QUERYFORMATTEXTLENGTH, MPFROMLONG(lIndex), MPFROMLONG(-1)); lCopied = (long)::WinSendMsg(GetHwnd(), MLM_EXPORT, MPFROMP(&lIndex), MPFROMP(&lBuflen)); zBuf[lCopied] = '\0'; @@ -917,7 +917,7 @@ wxString wxTextCtrl::GetLineText( ,&vParams ,0 )) - memcpy(zBuf, vParams.pszText, vParams.cchText); + memcpy((char*)zBuf, vParams.pszText, vParams.cchText); zBuf[vParams.cchText] = '\0'; } sStr = zBuf;