Click here to Skip to main content
13,150,385 members (29,279 online)
Rate this:
 
Please Sign up or sign in to 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 6-Oct-10 2:26am
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.170924.2 | Last Updated 6 Oct 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100