CRect rc;
GetClientRect(rc);
CPoint pt;
GetCursouPos(&pt);
if(rc.Ptinrect(pt))
  ......

解决方案 »

  1.   

    void CToolTipsDlg::OnMouseMove(UINT nFlags, CPoint point) 
    {
    // TODO: Add your message handler code here and/or call default
    if(m_bCap ==FALSE)
    {
    ::SetCapture(this->GetSafeHwnd());
    m_bCap=TRUE;
    }
    CRect R;
    this->GetWindowRect(R);
    CPoint pi(point);
    ::ClientToScreen(GetSafeHwnd(),&pi); if(!R.PtInRect(pi))
    {
    ::ReleaseCapture();
    MessageBox("Mouse Out!");
    m_bCap=FALSE;
    }
    /* CDialog::OnMouseMove(nFlags, point);*/
    }
    我这CODE可以得到MOUSE移出DIALOG的事件,可是MOUSE在DIALOG内部什么都不可以做[其CLICK不起作用],请问各位如何处理???
      

  2.   

    因为你忘记把消息转发给默认消息处理函数处理,即你不该把CDialog::OnMouseMove(nFlag,point);注释掉!