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

@@ -2174,7 +2174,7 @@ void wxWindowMSW::DoGetTextExtent(const wxString& string,
SIZE sizeRect;
TEXTMETRIC tm;
::GetTextExtentPoint32(hdc, string.wx_str(), string.length(), &sizeRect);
::GetTextExtentPoint32(hdc, string.t_str(), string.length(), &sizeRect);
GetTextMetrics(hdc, &tm);
if ( x )
@@ -3761,8 +3761,8 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
m_hWnd = (WXHWND)::CreateWindowEx
(
extendedStyle,
className.wx_str(),
title ? title : m_windowName.wx_str(),
className.t_str(),
title ? title : m_windowName.t_str(),
style,
x, y, w, h,
(HWND)MSWGetParent(),
@@ -3882,7 +3882,7 @@ bool wxWindowMSW::HandleTooltipNotify(WXUINT code,
(
CP_ACP,
0, // no flags
ttip.wx_str(),
ttip.t_str(),
tipLength,
buf,
WXSIZEOF(buf) - 1
@@ -5826,7 +5826,7 @@ int wxWindowMSW::HandleMenuChar(int WXUNUSED_IN_WINCE(chAccel),
wxMenuItem *item = (wxMenuItem*)mii.dwItemData;
const wxString label(item->GetItemLabel());
const wxChar *p = wxStrchr(label.wx_str(), wxT('&'));
const wxChar *p = wxStrchr(label.t_str(), wxT('&'));
while ( p++ )
{
if ( *p == wxT('&') )