From: David Webster Date: Wed, 27 Apr 2005 01:17:45 +0000 (+0000) Subject: Unicode fixes for OS/2 (all inside #ifdef __WXPM__ blocks X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/18ed8e00326db485a35eef1d03706e4a455111d7 Unicode fixes for OS/2 (all inside #ifdef __WXPM__ blocks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 8eb09bfabd..c631d06b30 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -120,7 +120,7 @@ bool wxDynamicLibrary::Load(const wxString& libnameOrig, int flags) #elif defined(__WXPM__) || defined(__EMX__) char err[256] = ""; - DosLoadModule(err, sizeof(err), libname.c_str(), &m_handle); + DosLoadModule(err, sizeof(err), (PSZ)libname.c_str(), &m_handle); #else m_handle = RawLoad(libname, flags); #endif @@ -177,7 +177,7 @@ void *wxDynamicLibrary::DoGetSymbol(const wxString &name, bool *success) const if( FindSymbol( m_handle, symName, &symAddress, &symClass ) == noErr ) symbol = (void *)symAddress; #elif defined(__WXPM__) || defined(__EMX__) - DosQueryProcAddr( m_handle, 1L, name.c_str(), (PFN*)symbol ); + DosQueryProcAddr( m_handle, 1L, (PSZ)name.c_str(), (PFN*)symbol ); #else symbol = RawGetSymbol(m_handle, name); #endif diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index e3be7dfb7b..9250d85d90 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1011,7 +1011,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) return false; } #elif defined(__OS2__) - if ( ::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) != 0 ) + if ( ::DosCopy((PSZ)file1.c_str(), (PSZ)file2.c_str(), overwrite ? DCPY_EXISTING : 0) != 0 ) return false; #elif defined(__PALMOS__) // TODO with http://www.palmos.com/dev/support/docs/protein_books/Memory_Databases_Files/ @@ -1236,7 +1236,7 @@ bool wxDirExists(const wxChar *pszPathName) return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY); #elif defined(__OS2__) - return (::DosSetCurrentDir(WXSTRINGCAST strPath)); + return (::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath))); #else // !__WIN32__ wxStructStat st; diff --git a/src/generic/busyinfo.cpp b/src/generic/busyinfo.cpp index f3f737f4b8..538a9525d7 100644 --- a/src/generic/busyinfo.cpp +++ b/src/generic/busyinfo.cpp @@ -52,7 +52,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message) int nParentWidth = parent->GetClientSize().x; int nColor; - SetBackgroundColour("WHITE"); + SetBackgroundColour(wxT("WHITE")); nColor = (LONG)GetBackgroundColour().GetPixel(); ::WinSetPresParam( GetHwnd() @@ -60,7 +60,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message) ,sizeof(LONG) ,(PVOID)&nColor ); - panel->SetBackgroundColour("WHITE"); + panel->SetBackgroundColour(wxT("WHITE")); nColor = (LONG)panel->GetBackgroundColour().GetPixel(); ::WinSetPresParam( GetHwndOf(panel) @@ -81,7 +81,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message) ,nHeight ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE ); - text->SetBackgroundColour("WHITE"); + text->SetBackgroundColour(wxT("WHITE")); nColor = (LONG)text->GetBackgroundColour().GetPixel(); ::WinSetPresParam( GetHwndOf(text) diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index e0bd6f8d08..ade1ce60ac 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -364,13 +364,13 @@ void wxStatusBarGeneric::InitColours() m_hilightPen = wxPen(hilightColour, 1, wxSOLID); #elif defined(__WXPM__) m_mediumShadowPen = wxPen(wxColour(127, 127, 127), 1, wxSOLID); - m_hilightPen = wxPen("WHITE", 1, wxSOLID); + m_hilightPen = wxPen(_T("WHITE"), 1, wxSOLID); wxColour vColour; - vColour.Set(wxString("LIGHT GREY")); + vColour.Set(wxString(_T("LIGHT GREY"))); SetBackgroundColour(vColour); - vColour.Set(wxString("BLACK")); + vColour.Set(wxString(_T("BLACK"))); SetForegroundColour(vColour); #else m_mediumShadowPen = wxPen("GREY", 1, wxSOLID);