Posted on 19-09-2010
Filed Under (Technology) by bigbang

I am building an application which can snapshot a screen shot and show the darker picture of this bitmap in my application.

We can also call this darker picture as semi transparent picture. It is just something like we put a gray transparent overlay on the top of this bitmap.

I try to do this job using MFC function CDC::BitBlt. Here is my example:

CRect rect;



          get the value of pDC here

pDC->BitBlt( 0, 0, rect.Width(), rect.Height(),

             &dcCompatible, 0, 0, MERGECOPY);

This way can make the bitmap darker, but the result is not perfect. If you want to make it perfect, you can use AlphaBlend function. I will write a blog article to descripbe how to use it.

© 2010 – 2012, The Big Bang on Reading Busy. All rights reserved.
On republishing this post you must provide link to the original post.

Post a Comment