Does GDI supports semi-transparency?

I'm using visual c++ 2005 with MFC.

I would like to draw a shape, a bitmap etc in half transparancy, i.e. in such a way that we should still be able to see whatever is beneath the shape.
Does GDI supports semi-transparency (real-time alpha blending)?

Who is Participating?
jkrConnect With a Mentor Commented:
>>Does GDI supports semi-transparency (real-time alpha blending)?

Yes. The API you need is 'SetLayeredWindowAttributes()' ( See e.g. ("Transparency without Source Code") ("Making any application transparent in Windows 2000/XP")
netformxAuthor Commented:
Not sure this is what I was looking for.
How would you suggest to draw a semi-transparnt shape on top of other opaque shapes?
Should I create a differnt window for the semi-transparent shape and then use API function SetLayeredWindowAttributes?

Thanks in advance.
If your focus is transparent bitmaps or regions, you might be better off with ("Drawing Transparent Bitmap with ease with on the fly masks in MFC") or a ready-made control like ("CLayeredBitmapCtrl")
netformxAuthor Commented:
both examples refer to full-transparency (i.e. bitmaps that are partialy opaque and partialy fully-transparent using a 1/0 mask).
I know this is feasible but my question refers to semi-transparency. See attached example.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.