title: How to set background color of window after I have registered it?
body: <p>I am not using a dialog, I'm using my own custom class which I have registered and then used the <code>CreateWindow</code> call to create it, I have preset the background color to red when registering:</p>
  
  <pre><code>WNDCLASSEX wc;
  wc.hbrBackground = CreateSolidBrush(RGB(255, 0, 0));
  </code></pre>
  
  <p>But now I want to change the background color at runtime, by e.g. clicking a button to change it to blue.</p>
  
  <p>I have tried to use <code>SetBkColor()</code> call in the <code>WM_PAINT</code>, and tried returning a brush from the <code>WM_CTLCOLORDLG</code> message, they don't work.</p>
  
  <p>Any help?</p>