Use wxString::t_str() in calls to Windows API functions in wxMSW.

Use t_str() instead of wx_str() to make the code work correctly in UTF-8 build
in which wx_str() returns a pointer to UTF-8 buffer while we need a wchar_t
pointer for Windows.

Closes #14371.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-06-03 19:16:59 +00:00
parent f40f8e1722
commit 017dc06b50
58 changed files with 164 additions and 164 deletions

View File

@@ -557,7 +557,7 @@ bool wxConsoleStderr::Write(const wxString& text)
return false;
}
if ( !::WriteConsole(m_hStderr, text.wx_str(), text.length(), &ret, NULL) )
if ( !::WriteConsole(m_hStderr, text.t_str(), text.length(), &ret, NULL) )
{
wxLogLastError(wxT("WriteConsole"));
return false;
@@ -692,7 +692,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
ClassRegInfo regClass(name);
wndclass.lpszClassName = regClass.regname.wx_str();
wndclass.lpszClassName = regClass.regname.t_str();
if ( !::RegisterClass(&wndclass) )
{
wxLogLastError(wxString::Format(wxT("RegisterClass(%s)"),
@@ -701,7 +701,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
}
wndclass.style &= ~(CS_HREDRAW | CS_VREDRAW);
wndclass.lpszClassName = regClass.regnameNR.wx_str();
wndclass.lpszClassName = regClass.regnameNR.t_str();
if ( !::RegisterClass(&wndclass) )
{
wxLogLastError(wxString::Format(wxT("RegisterClass(%s)"),
@@ -716,7 +716,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
// function returns (it could be invalidated later if new elements are
// added to the vector and it's reallocated but this shouldn't matter as
// this pointer should be used right now, not stored)
return gs_regClassesInfo.back().regname.wx_str();
return gs_regClassesInfo.back().regname.t_str();
}
bool wxApp::IsRegisteredClassName(const wxString& name)