Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Child window Z order and painting

0 views
Skip to first unread message

Adam M. Fass

unread,
Aug 9, 2001, 10:21:16 PM8/9/01
to
I'm writing an MFC application which manages a bunch of overlapping child
windows on a single parent window. According to this article, overlapping child
windows should be repainted starting with the bottom window, so the top window
is the last one to get a WM_PAINT message:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/hh/gdi/pantdraw_2s32.asp

I've tried this on two machines running Win2000 and one running Win98, and the
child windows are painted in the wrong order. I've verified this using TRACE
statements, and if I click on an area where two child windows overlap, the
window that appears to be on top does not get the WM_LBUTTONDOWN message.

So far, the only fix I've found is to use the WS_CLIPSIBLINGS style, but this is
ultimately not what I want. I want the top windows to be able to paint over the
bottom windows so that they can have transparent areas. I've tried using the
WS_EX_TRANSPARENT style, but that doesn't appear to do anything at all.

Does anyone know how I can get the child windows to repaint in the correct
order? Is this a bug in Windows or in MFC?

-Adam

0 new messages