我想在界面上的某一个地方,当有鼠标放在这里时,可以弹出另外一个菜单(不是点击,象金山词霸那样,当鼠标放到文字上,就可以把相应的翻译显示出来,)
    是用什么控件和事件呀!在线等待中!

解决方案 »

  1.   

    在onMouseMove事件中,再判断坐标位置
      

  2.   

    消息处理WM_MOUSEMOVE:
    事件:
    CRect rect;
    if(rect.PtInRect(CPoint))
    {
        ......
    }
      

  3.   

    BOOL PtInRect( POINT point ) const;Return ValueNonzero if the point lies within CRect; otherwise 0.ParameterspointContains a POINT structure or CPoint object.ResDetermines whether the specified point lies within CRect. A point is within CRect if it lies on the left or top side or is within all four sides. A point on the right or bottom side is outside CRect.Note   The rectangle must be normalized or this function may fail. You can call NormalizeRect to normalize the rectangle before calling this function.
      

  4.   


    void CMydilog::OnMouseMove(UINT nFlags, CPoint point) 
    {
       if( point.x>10&& point.x<100//在此范围内提示
               point.y>10&& point.y<100)
      {
         CString str="mystring";
         CDC* pDC=new CDC;
         pDC=GetDC();
         pDC->TextOut(x,y,str,str.GetLength());
      }
         CDialog::OnMouseMove(nFlags, point);