Transparent window problems

Is there a way to make a (WS_EX_TOOLWINDOW | WS_CHILD) window transparent?
With WS_POPUP I use WS_EX_LAYERED and then the function SetLayeredWindowAttributes(...) but that doesn't work with this type of window. It will just appear invisible no matter what the alpha is set to.


Simon H.A.
WS_EX_LAYERED only work on top level windows in Windows 7. You could migrate to Windows 8 where this style is accepted in child windows.

But if that's not an option, I guess you'll have to fake the transparency or use SetWindowRgn() to create a non-rectangular window.

See if the extended style WS_EX_COMPOSITED is of any use to you. I think it helps because all children are drawn first. If you blit your background when you are supposed to erase, I think you get the transparency effect. I THINK.

I rarely program UI in C or C++ so I am definitely NOT an expert in this area.
I'll think I just use the WM_POPUP window and then I just make sure that it's at the right place. Can't seem to find a clean solution to making a child window transparent.


Simon H.A.
Topic archived. No new replies allowed.