1.建立一个全局的变量:CToolTipCtrl m_tooltip;
2.在OnInitDialog中加入初始部分:
if (!m_tooltip.Create(this, TTS_ALWAYSTIP))
{
  TRACE(_T("Unable To create ToolTip\n"));
  return FALSE;
}
m_tooltip.AddTool(GetDlgItem(IDC_BUTTON1),_T("this is button\r\nfilename"));
3.重载PreTranslateMessage函数,加入
if(pMsg->message== WM_LBUTTONDOWN ||pMsg->message== WM_LBUTTONUP || pMsg->message== WM_MOUSEMOVE)
  m_tooltip.RelayEvent(pMsg);
这样就能在ID为IDC_BUTTON1的按钮上出现提示了.但是提示语言不换行,我想让提示字符串变成:
this is button
filename的效果怎么实现?谢谢帮忙