Unicode compilation fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2005-06-12 12:12:21 +00:00
parent be283c77a0
commit 2173b18fc8
9 changed files with 40 additions and 32 deletions

View File

@@ -651,7 +651,7 @@ void wxApp::WakeUpIdle()
//
// Should never happen
//
wxLogLastError("PostMessage(WM_NULL)");
wxLogLastError(wxT("PostMessage(WM_NULL)"));
}
}
} // end of wxWakeUpIdle

View File

@@ -65,13 +65,13 @@ void wxBitmapRefData::Free()
{
if ( m_pSelectedInto )
{
wxLogLastError("GpiDeleteBitmap(hbitmap)");
wxLogLastError(wxT("GpiDeleteBitmap(hbitmap)"));
}
if (m_hBitmap)
{
if (!::GpiDeleteBitmap((HBITMAP)m_hBitmap))
{
wxLogLastError("GpiDeleteBitmap(hbitmap)");
wxLogLastError(wxT("GpiDeleteBitmap(hbitmap)"));
}
}
if (m_pBitmapMask)
@@ -186,7 +186,7 @@ wxBitmap::wxBitmap(
hPs = ::GpiCreatePS(vHabmain, hDc, &vSize, GPIA_ASSOC | PU_PELS);
if (hPs == 0)
{
wxLogLastError("GpiCreatePS Failure");
wxLogLastError(wxT("GpiCreatePS Failure"));
}
if (nDepth == 1)
@@ -256,7 +256,7 @@ wxBitmap::wxBitmap(
if (!hBmp)
{
wxLogLastError("CreateBitmap");
wxLogLastError(wxT("CreateBitmap"));
}
::GpiDestroyPS(hPs);
::DevCloseDC(hDc);

View File

@@ -413,7 +413,7 @@ bool wxFontRefData::Alloc(
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogLastError("CreateFont");
wxLogLastError(wxT("CreateFont"));
}
::GpiSetCharSet(m_hPS, flId); // sets font for presentation space

View File

@@ -355,7 +355,7 @@ bool wxIniConfig::Write(const wxString& szKey, const wxString& szValue)
// szValue, m_strLocalFilename) != 0;
if ( !bOk )
wxLogLastError("WritePrivateProfileString");
wxLogLastError(wxT("WritePrivateProfileString"));
return bOk;
}
@@ -400,7 +400,7 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
// NULL, m_strLocalFilename) != 0;
if ( !bOk )
wxLogLastError("WritePrivateProfileString");
wxLogLastError(wxT("WritePrivateProfileString"));
return bOk;
}
@@ -415,7 +415,7 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
// NULL, m_strLocalFilename) != 0;
if ( !bOk )
wxLogLastError("WritePrivateProfileString");
wxLogLastError(wxT("WritePrivateProfileString"));
return bOk;
}
@@ -434,7 +434,7 @@ bool wxIniConfig::DeleteAll()
size_t nRc = 0; // = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
if ( nRc == 0 )
{
wxLogLastError("GetWindowsDirectory");
wxLogLastError(wxT("GetWindowsDirectory"));
}
else if ( nRc > WXSIZEOF(szBuf) )
{

View File

@@ -95,7 +95,7 @@ void wxMenu::Init()
,NULL
)) == 0)
{
wxLogLastError("WinLoadMenu");
wxLogLastError(wxT("WinLoadMenu"));
}
m_vMenuData.iPosition = 0;
m_vMenuData.afStyle = MIS_SUBMENU | MIS_TEXT;
@@ -131,7 +131,7 @@ wxMenu::~wxMenu()
{
if (!::WinDestroyWindow((HWND)GetHmenu()) )
{
wxLogLastError("WinDestroyWindow");
wxLogLastError(wxT("WinDestroyWindow"));
}
}
@@ -354,7 +354,7 @@ bool wxMenu::DoInsertOrAppend(
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(wxT("Error inserting or appending a menuitem. Error: %s\n"), sError.c_str());
wxLogLastError("Insert or AppendMenu");
wxLogLastError(wxT("Insert or AppendMenu"));
return FALSE;
}
else
@@ -562,7 +562,7 @@ void wxMenu::SetTitle(
{
if (!::WinSetWindowText(hMenu, (PSZ)rLabel.c_str()))
{
wxLogLastError("SetMenuTitle");
wxLogLastError(wxT("SetMenuTitle"));
}
}
}
@@ -583,7 +583,7 @@ void wxMenu::SetTitle(
//
if (!::WinSetWindowText(hMenu, (PSZ)rLabel.c_str()))
{
wxLogLastError("SetMenuTitle");
wxLogLastError(wxT("SetMenuTitle"));
}
}
}
@@ -769,7 +769,7 @@ WXHMENU wxMenuBar::Create()
,NULL
)) == 0)
{
wxLogLastError("WinLoadMenu");
wxLogLastError(wxT("WinLoadMenu"));
}
else
{
@@ -840,7 +840,7 @@ void wxMenuBar::EnableTop(
nId = SHORT1FROMMR(::WinSendMsg((HWND)m_hMenu, MM_ITEMIDFROMPOSITION, MPFROMSHORT(nPos), (MPARAM)0));
if (nId == MIT_ERROR)
{
wxLogLastError("LogLastError");
wxLogLastError(wxT("LogLastError"));
return;
}
::WinSendMsg((HWND)m_hMenu, MM_SETITEMATTR, MPFROM2SHORT(nId, TRUE), MPFROM2SHORT(MIA_DISABLED, uFlag));
@@ -866,7 +866,7 @@ void wxMenuBar::SetLabelTop(
nId = SHORT1FROMMR(::WinSendMsg((HWND)m_hMenu, MM_ITEMIDFROMPOSITION, MPFROMSHORT(nPos), (MPARAM)0));
if (nId == MIT_ERROR)
{
wxLogLastError("LogLastError");
wxLogLastError(wxT("LogLastError"));
return;
}
if(!::WinSendMsg( (HWND)m_hMenu
@@ -875,13 +875,13 @@ void wxMenuBar::SetLabelTop(
,MPARAM(&vItem)
))
{
wxLogLastError("QueryItem");
wxLogLastError(wxT("QueryItem"));
}
nId = vItem.id;
if (::WinSendMsg(GetHmenu(), MM_SETITEMTEXT, MPFROMSHORT(nId), (MPARAM)rLabel.c_str()));
{
wxLogLastError("ModifyMenu");
wxLogLastError(wxT("ModifyMenu"));
}
Refresh();
} // end of wxMenuBar::SetLabelTop
@@ -916,7 +916,7 @@ wxMenu* wxMenuBar::Replace(
nId = SHORT1FROMMR(::WinSendMsg((HWND)m_hMenu, MM_ITEMIDFROMPOSITION, MPFROMSHORT(nPos), (MPARAM)0));
if (nId == MIT_ERROR)
{
wxLogLastError("LogLastError");
wxLogLastError(wxT("LogLastError"));
return NULL;
}
if (!pMenuOld)
@@ -1030,7 +1030,7 @@ wxMenu* wxMenuBar::Remove(
);
if (nId == MIT_ERROR)
{
wxLogLastError("LogLastError");
wxLogLastError(wxT("LogLastError"));
return NULL;
}
if (IsAttached())
@@ -1105,7 +1105,7 @@ void wxMenuBar::Attach(
,m_vAccelTable.GetHACCEL()
,(HWND)pFrame->GetFrame()
))
wxLogLastError("WinSetAccelTable");
wxLogLastError(wxT("WinSetAccelTable"));
#endif // wxUSE_ACCEL
} // end of wxMenuBar::Attach

View File

@@ -260,7 +260,7 @@ void wxMenuItem::Enable(
);
if (!bOk)
{
wxLogLastError("EnableMenuItem");
wxLogLastError(wxT("EnableMenuItem"));
}
wxMenuItemBase::Enable(bEnable);
} // end of wxMenuItem::Enable
@@ -362,7 +362,7 @@ void wxMenuItem::Check(
}
if (!bOk)
{
wxLogLastError("CheckMenuItem");
wxLogLastError(wxT("CheckMenuItem"));
}
wxMenuItemBase::Check(bCheck);
} // end of wxMenuItem::Check
@@ -403,7 +403,7 @@ void wxMenuItem::SetText(
,(MPARAM)&vItem
))
{
wxLogLastError("GetMenuState");
wxLogLastError(wxT("GetMenuState"));
}
else
{

View File

@@ -428,9 +428,11 @@ const wxChar* wxGetHomeDir(
}
// Hack for OS/2
wxChar* wxGetUserHome (
const wxString& rUser
)
#if wxUSE_UNICODE
const wxMB2WXbuf wxGetUserHome( const wxString &rUser )
#else // just for binary compatibility -- there is no 'const' here
wxChar* wxGetUserHome ( const wxString &rUser )
#endif
{
wxChar* zHome;
wxString sUser1(rUser);
@@ -465,9 +467,15 @@ wxChar* wxGetUserHome (
{
wxStrcpy(wxBuffer, zHome);
wxUnix2DosFilename(wxBuffer);
#if wxUSE_UNICODE
wxWCharBuffer retBuffer (wxBuffer);
delete[] wxBuffer;
return retBuffer;
#else
wxStrcpy(zHome, wxBuffer);
delete[] wxBuffer;
return zHome;
#endif
}
}
delete[] wxBuffer;

View File

@@ -88,7 +88,7 @@ static ULONG wxExecuteThread(
);
if (ulRc != NO_ERROR)
{
wxLogLastError("DosWaitChild");
wxLogLastError(wxT("DosWaitChild"));
}
delete pData;
return 0;
@@ -195,7 +195,7 @@ long wxExecute(
);
if (rc != NO_ERROR)
{
wxLogLastError("CreateThread in wxExecute");
wxLogLastError(wxT("CreateThread in wxExecute"));
delete pData;
// the process still started up successfully...

View File

@@ -3720,7 +3720,7 @@ bool wxWindowOS2::HandlePaint()
if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_ERROR)
{
wxLogLastError("CreateRectRgn");
wxLogLastError(wxT("CreateRectRgn"));
return FALSE;
}