我选定了一块区域 如果鼠标移动到那里
则悬浮提示 
就是类似于鼠标工具栏上  有打开 保存 打印的那样的提示
有没有相应的方法谢谢void CDemo2View::OnMouseMove(UINT nFlags, CPoint point) 
{
CRect rc11; rc11.SetRect(0,0,125,200); if (rc11.PtInRect(point)) {
         //出现鼠标提示
SetCursor(AfxGetApp()->LoadCursor(IDC_HANDCURSOR));
}
}

解决方案 »

  1.   

    http://www.codeproject.com/miscctrl/xinfotip.asp
      

  2.   

    在OnMouseMove中TRACKMOUSEEVENT tme;
    tme.cbSize = sizeof (tme);
    tme.dwFlags = TME_HOVER | TME_LEAVE;
    tme.hwndTrack = m_hWnd;
    tme.dwHoverTime = HOVER_DEFAULT;
    _TrackMouseEvent (&tme);然后你就能截获WM_MOUSEHOVER了。在WM_MOUSEHOVER的处理中搞定消息提示。
      

  3.   

    1.View中加一个变量CToolTipCtrl tip;
    2.添加PreTranslateMessage虚函数 
    BOOL CDemo2View::PreTranslateMessage(MSG* pMsg) 
    {
    if(tip.m_hWnd)
    tip.RelayEvent(pMsg);
    return CView::PreTranslateMessage(pMsg);
    }
    3.添加OnInitialUpdate虚函数
    void CDocViewView::OnInitialUpdate() 
    {
    CView::OnInitialUpdate();

    tip.Create(this);
    EnableToolTips();
    CRect r(0,0,300,200);
    tip.AddTool(this,"tooltip",&r,1);
    }
      

  4.   

    使用CToolTipCtrl类 定义一个变量tip在OnInitialUpdate函数中初始化
    tip.Create(this); //创建
    EnableToolTips(); //激活
    CRect r(0,0,300,200); //要显示的区域
    tip.AddTool(this,"你的提示",&r,1); 在PreTranslateMessage函数中截获
    if(tip.m_hWnd)
    tip.RelayEvent(pMsg);
      

  5.   

    如果用CToolTipCtrl类,怎样才能将让Tooltip跟随鼠标?