Search code examples
c++winapiredraw

Win32 Windows Redraw through Top Window


I have a Win32 application with multiple child windows to the main window. During runtime I expand one of the child windows such that it covers other child windows. When I move this window by its caption( causing a WM_EXITSIZEMOVE message ) the windows beneath the expanded window 'shine' through( are redrawn over the expanded window ) causing visible artifacts. How do I prevent this from happening?

EDIT: When I expand the window I use the following code:

SetWindowPos( hWnd, HWND_TOP, rct.left, rct.top, rct.right, rct.bottom, 0 );

Also, the only windows that shine through are splitter windows created with EasySplit...


Solution

  • Apply WS_CLIPCHILDREN style on parent and WS_CLIPSIBLINGS on children.