R – WS_EX_LAYERED colorkey – Vista issues

transparentwinapiwindows-vista

We place our transparent app window, over the window of another process. Our window contains some child controls. We create a WS_EX_LAYERED window, using colorkey for selective transparency. The main window is completely transparent, so it only functions as a container for the child controls.

This works fine on XP and Vista without Aero. However, on Vista with Aero clicks do not pass through the transparent area. What can we do?

Using WS_EX_TRANSPARENT fails, it makes our own controls inoperable, of course.

I have considered hiding the parent window (WS_SHOWWINDOW), but I am fairly certain that that will hide all children, and AFAIK resizing the window to a minimal size, with any combination of CLIPCHILDREN & CLIPSIBLINGS would fail in a similar way…

Thanks for any help.

Best Answer

Another option is to use a window region and not WS_EX_LAYERED