PtInRect

void CTestView::OnLButtonDown(UINT nFlags, CPoint point)

{

  if(m_rectEllipse.PtInRect(point){

    if(m_nColor == GRAY_BRUSH){

       m_nColor = WHITE_BRUSH;

    }

    else{

        m_nColor = GRAY_BRUSH;

    }

    InvalidateRect(m_rectEllipse);

  }

}

你可能感兴趣的:(in)