title: MFC/C++: Setting property BS_OWNERDRAW to checkbox button doesn't work
body: <p>I am trying to change draw context (background color, text color, icon, ...)  of checkbox button dynamically, but I have several problems to draw it, because when I try to modify style in <code>PreSubclassWindow</code> callback, the framework doesn't paint the checkbox control.</p>
  
  <pre><code>void CheckBoxButton::PreSubclassWindow()
  {
     ModifyStyle(0xf, BS_CHECKBOX);
     ModifyStyle(0, BS_OWNERDRAW);
  
     CButton::PreSubclassWindow();
  }
  </code></pre>
  
  <p>Also see implemented code according to proposals below:</p>
  
  <pre><code>void CheckBoxButton::paint()
      {
          HTHEME theme;
          CRect rect;
          GetClientRect(rect);
  
          theme = OpenThemeData(this-&gt;GetSafeHwnd(), L"Button");
          HRESULT result = DrawThemeBackground(theme, GetDC()-&gt;GetSafeHdc(), BP_CHECKBOX, CBS_CHECKEDDISABLED, &amp;rect, NULL);
      }
  </code></pre>