I have an issue where overlapping child windows are not being painted correctly when one window is updated below another window that has the WS_EX_TRANSPARENT style.
The parent window has two children, W1 and W2, that overlap with W1 being above W2 in the z-order. W1 has the extended style WS_EX_TRANSPARENT. The issue is that when W2 paints in its client area (I'm testing this by invalidating W2), the W2 entirely paints over the overlapping portion of W1. If the parent is redrawn then both overlapping children are drawn in the correct order.
The child windows are drawn correctly when WS_CLIPSIBLINGS is set on W2 and WS_EX_TRANSPARENT is removed from W1. If W2's client area is invalidated in this situation, it paints but does not draw over the portion obscured by W1.
WS_EX_TRANSPARENT is being used because the first child window is being used as an overlay for the second child window, and I would like to avoid having mouse clicks blocked by the overlay.
Is there a way to have overlapping windows draw correctly with the WS_EX_TRANSPARENT style or can I get the same behavior using some sort of workaround?