title: How can I draw a patternBrush with transparent backround (GDI)?
body: <p>I can't draw a pattern with a transparent background. This is my snippet :</p>
  
  <pre><code>bitmap.CreateBitmap(8, 8, 1, 1, &amp;bits)
  brush.CreatePatternBrush(&amp;bitmap)
  hbrush = pCgrCurrentDC-&gt;SelectObject(&amp;brush);
  // set text color 
  TextCol = pCgrCurrentDC-&gt;SetTextColor(CgrColourPalRGB);  
  int oldBkgrdMode = pCgrCurrentDC-&gt;SetBkMode(TRANSPARENT);
  //draw polygon 
  pCgrCurrentDC-&gt;Polygon(CgrBuffer, n);
  </code></pre>
  
  <p>The doc on <a href="http://msdn.microsoft.com/en-us/library/dce1hh4s(VS.80).aspx" rel="nofollow noreferrer">msdn</a> doesn't mention anything about transparency. I guess this mode could be used? Or is this a bug ?</p>
  
  <p>Thanks!</p>