title: MFC: Ring - no color change
body: <p>I'm trying to learn MFC from book: MV C++ Windows Application by Example(2008). There is example app. where I can draw rings filled witch chosen color:</p>
  
  <pre><code>void CRingView::OnDraw(CDC* pDC)
  {
  CRingDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
  if (!pDoc)
      return;
  PointArray&amp; pointArray = pDoc-&gt;GetPointArray();
  ColorArray&amp; colorArray = pDoc-&gt;GetColorArray();
  int iSize = static_cast&lt;int&gt;(pointArray.GetSize());
  for (int iIndex = 0; iIndex &lt; iSize; iIndex++)
  {
      CPoint point = pointArray[iIndex];
      COLORREF color = colorArray[iIndex];
      CPen pen(PS_SOLID, 0, BLACK);
      CBrush brush(color);
      pDC-&gt;Ellipse(point.x - RADIUS, point.y - RADIUS, point.x + RADIUS, point.y + RADIUS);
      CPen* pOldPen = pDC-&gt;SelectObject(&amp;pen);
      CBrush* pOldBrush = pDC-&gt;SelectObject(&amp;brush);
  }
  }
  </code></pre>
  
  <p>but there is no color change(always white like bg) even if I do:</p>
  
  <pre><code>CBrush brush(BLACK);
  </code></pre>
  
  <p>So question is: What I'm doing wrong? I'm using Visual Studio 2013 but with new project there shouldn't be any compatibility errors.
  And BLACK is:</p>
  
  <pre><code>static const COLORREF BLACK = RGB(0, 0, 0);
  </code></pre>