title: MFC: How do I change the background color of the whole editBox?
body: <p>My questions is similar to:
  <a href="https://stackoverflow.com/questions/4328026/win32-display-editbox-with-black-color-in-text-area-on-windows-mobile-5">win32 : display editbox with black color in text area on windows mobile 5</a></p>
  
  <p>However I'm using MFC which doesn't have the same solution available as the one in the above link.</p>
  
  <p><strong>How do I change the background color of the whole background, not just the background behind the text of an edit box?</strong></p>
  
  <p>Below is my code, that only changes the background behind the text, not the whole background of the edit box.</p>
  
  <pre><code>HBRUSH CGadgetStandardDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
  {
      HBRUSH hbr = CStandardDialog::OnCtlColor(pDC, pWnd, nCtlColor);
      pDC-&gt;SetBkColor(RGB(255,255,255));
  
      return hbr;
  }
  </code></pre>