I would like to create a top-level window (i.e. not WS_CHILD) with transparency. However, I do not want it to be a simple mask, where the given pixel is either completely transparent or completely opaque. And I don’t want it to be so that the whole window has an alpha level. Rather, I want the window to be essentially completely transparent, with a bitmap drawn on it with an alpha channel, so that the bitmap mixes with any windows that may be behind it. A picture, say, of a solar charge, where the image of its own alpha mixture is from opaque to completely transparent outward from the center.
I found two methods that come close to what I want to do, but not quite. Using regions, I can cut out a fully transparent section. Using layered windows, I can also do something like this (or even make the whole window transparent, but that's not what I want at all). I looked at other styles, such as WS_EX_TRANSPARENT and WS_EX_COMPOSITE, but to no avail.
I can get this effect to work fine on child windows, as they mix with the parent windows in the parent region. The fact that it works similarly for top-level windows continues to elude me.
I know that this can be done, because people assured me that they saw it in other programs. I feel like I just don't quite understand something simple here about painting windows.
source
share