The situation:
* Using a Window with the Scroll bar capabilities.
* The mapping mode is MM_HIMETRIC.
* Just drawn a Circle in the View using OnDraw()
* Handled MouseLeft button click to perform the hit test.

I know that:
* Mouse Co-ordinates are device co-ordinate system (in pixel)
* The circle drawn is in the Logical Co ordinate

My Doubt:
The following code does't work . Why? What is wrong with me. I have tested it after converting the point into Logical point.

Code :

void CEX04CView::OnLButtonDown(UINT nFlags, CPoint point)
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
CRect rectDevice = m_rectEllipse;
dc.DPtoLP(& point);
if (rectDevice.PtInRect(point))
if (m_nColor == GRAY_BRUSH)
m_nColor = WHITE_BRUSH;
m_nColor = GRAY_BRUSH;
CScrollView::OnLButtonDown(nFlags, point);