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:
@@ -263,7 +263,7 @@ int wxDirDialog::ShowSHBrowseForFolder(WXHWND owner)
|
||||
#endif
|
||||
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;
|
||||
bi.lpfn = BrowseCallbackProc;
|
||||
bi.lParam = (LPARAM)m_path.wx_str(); // param for the callback
|
||||
bi.lParam = wxMSW_CONV_LPARAM(m_path); // param for the callback
|
||||
|
||||
static const int verComCtl32 = wxApp::GetComCtl32Version();
|
||||
|
||||
@@ -490,7 +490,7 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
|
||||
}
|
||||
|
||||
SendMessage(hwnd, BFFM_SETSTATUSTEXT,
|
||||
0, (LPARAM)strDir.wx_str());
|
||||
0, wxMSW_CONV_LPARAM(strDir));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user