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:
@@ -317,7 +317,7 @@ void wxStatusBar::DoUpdateStatusText(int nField)
|
||||
|
||||
// Set the status text in the native control passing both field number and style.
|
||||
// NOTE: MSDN library doesn't mention that nField and style have to be 'ORed'
|
||||
if ( !StatusBar_SetText(GetHwnd(), nField | style, text.wx_str()) )
|
||||
if ( !StatusBar_SetText(GetHwnd(), nField | style, text.t_str()) )
|
||||
{
|
||||
wxLogLastError("StatusBar_SetText");
|
||||
}
|
||||
@@ -563,7 +563,7 @@ void wxStatusBar::SetStatusStyles(int n, const int styles[])
|
||||
// the fields' styles.
|
||||
// NOTE: MSDN library doesn't mention that nField and style have to be 'ORed'
|
||||
wxString text = GetStatusText(i);
|
||||
if (!StatusBar_SetText(GetHwnd(), style | i, text.wx_str()))
|
||||
if (!StatusBar_SetText(GetHwnd(), style | i, text.t_str()))
|
||||
{
|
||||
wxLogLastError("StatusBar_SetText");
|
||||
}
|
||||
|
Reference in New Issue
Block a user