windows beneath not being painted when using a layered window

Posted by Nuno on Stack Overflow See other posts from Stack Overflow or by Nuno
Published on 2010-05-16T21:10:54Z Indexed on 2010/05/16 23:20 UTC
Read the original article Hit count: 281

Filed under:
|
|
|

Hi,

I will try to explain my problem the best i can,

I'm creating a layered window in c++ (using windowsXP), all works fine until i drag my created window near the windows start button, and then when i press the star button of windows taskbar and close it again all the windows beneath of my layered window aren't being painted (only in the area of the start window that pops over my window).

My create window is like this:

CWnd::CreateEx( WS_EX_TOOLWINDOW | WS_EX_LAYERED, AfxRegisterWndClass(0), lpstr_name, WS_POPUP, 0,0,0,0, pc_parent->GetSafeHwnd(), 0);

...

When i create the window with this styles the problem ocurrs, but if i create with the extended style WS_EX_TRANSPARENT and all the others the problem does not occur any more. And if instead of a WS_POPUP window is a WS_CHILD or WS_OVERLAPPED then this also doesn't occur...

Can anyone please explain why when i create a WS_POPUP window with the WS_EX_LAYERED style all the beneath windows aren't updated, and if i add the style WS_EX_TRANSPARENT this works fine.

Note: why i do not use the WS_EX_TRANSPARENT style if it works right? if i use it then my window can not be dragged and i need it to do it :)

Thanks

© Stack Overflow or respective owner

Related posts about c++

Related posts about mfc