title: ClearType ruins transparency
body: <p>I have a bitmap which background needs to be replaced with part of another bitmap. Everything works fine until I enable <em>ClearFont</em> on my <em>WindowsXP</em>.</p>
  
  <p>In order to explain my problem better, let us label first bitmap as <code>bmpDestination</code> and second as <code>bmpSource</code>. </p>
  
  <p>Here is how the <code>bmpSource</code> looks like : </p>
  
  <p><img src="https://i.stack.imgur.com/qmIwW.png" alt="enter image description here"></p>
  
  <p>Here is how <code>bmpDestination</code> looks like :</p>
  
  <p><img src="https://i.stack.imgur.com/u5yUB.png" alt="enter image description here"></p>
  
  <p>When <em>ClearType</em> is off, here is how the correct result looks like :</p>
  
  <p><img src="https://i.stack.imgur.com/R6w8Y.png" alt="enter image description here"></p>
  
  <p>And here is the incorrect result of their combining when <em>ClearType</em> is on:</p>
  
  <p><img src="https://i.stack.imgur.com/X03XF.png" alt="enter image description here"></p>
  
  <p><em>ClearType</em> alters some parts of the text background color, so they aren't white anymore ( <code>RGB( 255, 255, 255 )</code> ) but a combination of white and text color. </p>
  
  <p>I am using <code>BitBlt()</code> and monochrome bitmap to create a mask, and to simulate transparency. I have tried using <code>TransparentBlt()</code> too, but got the same result.</p>
  
  <p>How can I combine <code>bmpSource</code> and <code>bmpDestination</code>, when ClearType is enabled, so I can create correct result like above ?</p>
  
  <p>Thank you for your help.</p>
  
  <p>Best regards.</p>