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

@@ -959,7 +959,7 @@ void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
return;
wxTreeViewItem tvItem(item, TVIF_TEXT);
tvItem.pszText = (wxChar *)text.wx_str(); // conversion is ok
tvItem.pszText = wxMSW_CONV_LPTSTR(text);
DoSetItem(&tvItem);
// when setting the text of the item being edited, the text control should
@@ -972,7 +972,7 @@ void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
{
if ( item == m_idEdited )
{
::SetWindowText(hwndEdit, text.wx_str());
::SetWindowText(hwndEdit, text.t_str());
}
}
}
@@ -1476,7 +1476,7 @@ wxTreeItemId wxTreeCtrl::DoInsertAfter(const wxTreeItemId& parent,
if ( !text.empty() )
{
mask |= TVIF_TEXT;
tvIns.item.pszText = (wxChar *)text.wx_str(); // cast is ok
tvIns.item.pszText = wxMSW_CONV_LPTSTR(text);
}
else
{