Clipping a Layered Window
Posted on 2006-06-30
I have a layered pop-up window which contains several child dialogs. the children should not be of concern to this question. The outer corners of the pop-up are rounded, I have been using standard windows clipping regions to clip them however they produc a somewhat undesired jagged edge (no anti-aliasing). If I make the region big enough to show the anti-aliased corner I get a crappy border around the pop-up (and you can still see the pixelation in it). It is my understanding that the color-key of a layered window defines a color that will not be rendered to the desktop (transparent).
I use SetLayeredWindowAttributes() to fade the popup in and out. This works very well, so the function calls are being made.
In OnPaint(), I use GDI+ Graphics::Clear() to set the entire background to the desired 'transparent' color, I then procede to draw the pop-ups frame and interior. But when it's all done, the transparent color is not very transparent (doesn't work).
// initial set layered window in the override of CreateEx() (after everything is created and verified)
// dont mind the '0' alpha, the pop-up initially fades in
So... ... How do I get my pop-up edges 'smoothly' transparent?
Thank you in advance.