title: GDI+ round corner image c++
body: <p>I'm using GDI+ to draw image on a <code>CStatic *element</code> using this class :
  <a href="https://www.codeproject.com/Articles/24969/An-MFC-picture-control-to-dynamically-show-picture" rel="nofollow noreferrer">https://www.codeproject.com/Articles/24969/An-MFC-picture-control-to-dynamically-show-picture</a></p>
  
  <p>Here is my code <code>onDraw</code></p>
  
  <pre><code>void CPictureCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
  {
  if (mBIsPicLoaded)  {
      RECT rc;
      this-&gt;GetClientRect(&amp;rc);
  
      Graphics graphics(lpDrawItemStruct-&gt;hDC);
      Image image(mPstream);
      graphics.DrawImage(&amp;image, (INT)rc.left, (INT)rc.top, (INT)(rc.right - rc.left), (INT)(rc.bottom - rc.top));
  }
  }
  </code></pre>
  
  <p>The image is displayed as a rectangle. But I would like to make it round.
  How to do it ?
  Thanks</p>