Question

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.

Was it helpful?

Solution

Another option is to use a window region and not WS_EX_LAYERED

OTHER TIPS

  • WS_EX_LAYERED is what handles graphical Window Transparency, click-through is merely a side-effect that happened to work on older Windows OSes.
  • WS_EX_TRANSPARENT is what makes the mouse transparent. Graphical transparency is not assured with this flag. You must manually draw the controls (using GDI functions) (like in a directX application) and catch the cursor position using a low level hook.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top