X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57bd4c6031d438f11af0ec540136f49a928b923c..65fd2fc2616552e4204223b7c2b69d9bc87c1f2d:/src/msw/tooltip.cpp diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index aa5388cf2d..0e41099317 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -291,7 +291,7 @@ void wxToolTip::Add(WXHWND hWnd) // NMTTDISPINFO struct -- and setting the tooltip here we can have tooltips // of any length ti.hwnd = hwnd; - ti.lpszText = (wxChar *)m_text.c_str(); // const_cast + ti.lpszText = (wxChar *)m_text.wx_str(); // const_cast if ( !SendTooltipMessage(GetToolTipCtrl(), TTM_ADDTOOL, &ti) ) { @@ -339,7 +339,7 @@ void wxToolTip::Add(WXHWND hWnd) while (token.length()) { SIZE sz; - if ( !::GetTextExtentPoint32(hdc, token, token.length(), &sz) ) + if ( !::GetTextExtentPoint32(hdc, token.wx_str(), token.length(), &sz) ) { wxLogLastError(wxT("GetTextExtentPoint32")); } @@ -360,7 +360,7 @@ void wxToolTip::Add(WXHWND hWnd) // replace the '\n's with spaces because otherwise they appear as // unprintable characters in the tooltip string m_text.Replace(_T("\n"), _T(" ")); - ti.lpszText = (wxChar *)m_text.c_str(); // const_cast + ti.lpszText = (wxChar *)m_text.wx_str(); // const_cast if ( !SendTooltipMessage(GetToolTipCtrl(), TTM_ADDTOOL, &ti) ) { @@ -434,7 +434,7 @@ void wxToolTip::SetTip(const wxString& tip) { // update the tip text shown by the control wxToolInfo ti(GetHwndOf(m_window)); - ti.lpszText = (wxChar *)m_text.c_str(); + ti.lpszText = (wxChar *)m_text.wx_str(); (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, &ti); }