title: About Draw Ellipse in Static Control ( MFC)
body: <p>When I doubleclick in Static Control, I will draw ellipse in Static Control in the position of  mouse.(MFC);
  But, It apears that:
  <img src="https://i.stack.imgur.com/m3QUk.jpg" alt="suprised" /></p>
  <p>And My code:</p>
  <p>void CTreeShowLabel::OnLButtonDblClk(UINT nFlags, CPoint point)</p>
  <p>{</p>
  <p>//设置画笔</p>
  <p>COLORREF black = RGB(255, 0, 0);</p>
  <p>CPen pen(PS_SOLID, 1, black);</p>
  <p>CClientDC Dc(GetDlgItem(IDC_TREESTATIC));</p>
  <p>Dc.SelectObject(pen);</p>
  <pre><code>//在鼠标处画图
  CPoint curPos;
  GetCursorPos(&amp;curPos);
  
  CPoint point1(0,0);
  point1.x = curPos.x - 50;
  point1.y = curPos.y - 50;
  
  CPoint point2(0,0);
  point2.x = curPos.x + 50;
  point2.y = curPos.y + 50;
  
      //画圆
  Dc.Ellipse(CRect(point1, point2));
  CStatic::OnLButtonDblClk(nFlags, point);
  </code></pre>
  <p>}</p>
  <p>About the Circle is terrible.</p>