title: Using TransparentBlt
body: <p>I am trying to get my head round using the TransparentBlt function in visual c++ MFC. What I am aiming to achieve is to put one bitmap over the top of the other. The first bitmap is just a standard Stretchblt. The second bitmap is to be placed over the top of the background of the first bitmap. I have made the background of the second bitmap icon pink and I do not want the pink to be visible. Basically I just want to use a function for displaying the icon without showing the pink, how do I do this?  </p>
  
  <pre><code>#define TRANSPARENT_MASK RGB(250,84,248)
  </code></pre>
  
  <p>This is how I have done my the bottom layer bitmaps.</p>
  
  <pre><code> argDC-&gt;StretchBlt(WindowRect.left,WindowRect.top,WindowRect.Width(),WindowRect.Height(),
                    &amp;memDC,0,0,bits.bmWidth-1, bits.bmHeight-1, SRCCOPY);
  </code></pre>