Click here to Skip to main content
15,881,862 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am creating MDI project using extended classes: CMDIFrameWndExCWinAppExCMDIChildWndExMy view class is derived from CScrollView.Code is working fine if I don't apply any style to Child window in PreCreateWindow. But when I apply style with visibility true then some debug assertion comes. On debugging further I came to know that asertion comes in below block while redrawing window.void
CMFCBaseTabCtrl::SetLocation(Location location)
{
ASSERT_VALID(this);
m_location = location;
RecalcLayout();
if (GetSafeHwnd() != NULL)
{
GetParent()->RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_ALLCHILDREN);
}
}

Another thing which I noticed is that when a child window is created with style WS_VISIBLE then Ondraw() of view class is called before OnInitialUpdate().
My code and logic was working fine without using extended classes so I don't want to change it as it would be a lot of re-work. So can anybody guide me what to do ?
Posted
Updated 6-Oct-10 2:29am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900