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:
@@ -427,7 +427,7 @@ bool wxTextCtrl::MSWCreateText(const wxString& value,
|
||||
// implementation detail
|
||||
m_updatesCount = -2;
|
||||
|
||||
if ( !MSWCreateControl(windowClass.wx_str(), msStyle, pos, size, valueWin) )
|
||||
if ( !MSWCreateControl(windowClass.t_str(), msStyle, pos, size, valueWin) )
|
||||
return false;
|
||||
|
||||
m_updatesCount = -1;
|
||||
@@ -1109,7 +1109,7 @@ void wxTextCtrl::DoWriteText(const wxString& value, int flags)
|
||||
|
||||
::SendMessage(GetHwnd(), selectionOnly ? EM_REPLACESEL : WM_SETTEXT,
|
||||
// EM_REPLACESEL takes 1 to indicate the operation should be redoable
|
||||
selectionOnly ? 1 : 0, (LPARAM)valueDos.wx_str());
|
||||
selectionOnly ? 1 : 0, wxMSW_CONV_LPARAM(valueDos));
|
||||
|
||||
if ( !ucf.GotUpdate() && (flags & SetValue_SendEvent) )
|
||||
{
|
||||
|
Reference in New Issue
Block a user