title: Problems drawing Windows 10 Caption Buttons
body: <p>I'm having problems drawing Windows 10 themed Window Caption Buttons using the VisualStyleRenderer class.</p>
  
  <p>My problem is that I can't figure out which Theme Class to use.
  I tried <code>Window</code> and <code>CompositedWindow::Window</code>, however, none of those actually contain Windows 10 themed buttons as I found out using <a href="https://github.com/nptr/msstyleEditor" rel="nofollow noreferrer">this msstyle editor</a>.</p>
  
  <p>Which Theme Class contains Windows 10 themed Caption Buttons?</p>
  
  <p>How it looks now:</p>
  
  <p><a href="https://i.stack.imgur.com/fTuW0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fTuW0.png" alt="Windows 7 themed button"></a></p>
  
  <p>How I want it to look:</p>
  
  <p><a href="https://i.stack.imgur.com/ZxrGJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZxrGJ.png" alt="Windows 10 themed caption buttons"></a></p>
  
  <p>How I'm drawing the buttons:</p>
  
  <pre><code>protected override void OnPaint(PaintEventArgs e)
  {
      VisualStyleRenderer renderer = new VisualStyleRenderer("Window", 18 /*WP_CLOSEBUTTON*/, 1 /*CBS_NORMAL*/);
      var size = renderer.GetPartSize(e.Graphics, ThemeSizeType.True);
      renderer.DrawBackground(e.Graphics, new System.Drawing.Rectangle(10, 10, size.Width, size.Height));
  }
  </code></pre>