// 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) )
{
while (token.length())
{
SIZE sz;
- if ( !::GetTextExtentPoint32(hdc, token, token.length(), &sz) )
+ if ( !::GetTextExtentPoint32(hdc, token.wx_str(), token.length(), &sz) )
{
wxLogLastError(wxT("GetTextExtentPoint32"));
}
// 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) )
{
{
// 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);
}