Unicode fixes for OS/2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2005-04-27 01:19:43 +00:00
parent 18ed8e0032
commit 0fba44b410
46 changed files with 243 additions and 241 deletions

View File

@@ -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;