Please have a look at my project here:
I asked other questions regarding eliminating flicker in my child windows, but the answers also introduced this asserting when the user creates a new document.
The (skinned down for this question) app displays web pages in tabs. On startup it displays Yahoo! just for demonstration of the flickering. The code asserts in Wincore.cpp at the line
ASSERT(wndcls.style == nClassStyle);
I have deduced that the problem is down to the line
SetClassLong(m_hWnd, GCL_STYLE, GetClassLong(m_hWnd, GCL_STYLE) & ~(CS_HREDRAW | CS_VREDRAW));
that is contained within CChildFrame::OnCreate
Without this, no assertion but flicker. With it, assertion but no flicker.
I have no idea why this is, maybe you will ?
I know it is only a debug assertion error, and it does not happen in the release build, but I still think it should be sorted out !