Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC10.0
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 3:26am
Edited 6-Oct-10 3:29am
(no name)41.7K
v2

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

  Print Answers RSS
0 OriginalGriff 390
1 Sergey Alexandrovich Kryukov 329
2 Afzaal Ahmad Zeeshan 244
3 BillWoodruff 210
4 Maciej Los 192
0 OriginalGriff 5,560
1 DamithSL 4,476
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 6 Oct 2010
Copyright © CodeProject, 1999-2014
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