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:
@@ -412,7 +412,7 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
|
||||
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.pszText = (wxChar *)strText.wx_str();
|
||||
tcItem.pszText = wxMSW_CONV_LPTSTR(strText);
|
||||
|
||||
if ( !HasFlag(wxNB_MULTILINE) )
|
||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||
@@ -686,7 +686,7 @@ bool wxNotebook::InsertPage(size_t nPage,
|
||||
if ( !strText.empty() )
|
||||
{
|
||||
tcItem.mask |= TCIF_TEXT;
|
||||
tcItem.pszText = const_cast<wxChar *>(strText.wx_str());
|
||||
tcItem.pszText = wxMSW_CONV_LPTSTR(strText);
|
||||
}
|
||||
|
||||
// hide the page: unless it is selected, it shouldn't be shown (and if it
|
||||
|
Reference in New Issue
Block a user