Print Page | Close Window

Assertion in MFC CView by useing CXTTabCtrl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=7502
Printed Date: 13 November 2025 at 5:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Assertion in MFC CView by useing CXTTabCtrl
Posted By: decembler
Subject: Assertion in MFC CView by useing CXTTabCtrl
Date Posted: 02 July 2007 at 5:12am
Hello together,
 
I use the CXTTabCtrl in a CXTResizeDlg and add two CFormViews.
 
m_tab.AddView(thisApp.GetResString(IDS_ADMIN_USER), RUNTIME_CLASS(CAdminUserView));
m_tab.AddView(thisApp.GetResString(IDS_ADMIN_CONS), RUNTIME_CLASS(CAdminConsView));
 
When I call DoModal() I see all the Controls inside of the views, but
if I press any Button or select a listitem I get an assertion inside the
MFC-CView Class (OnMouseActivate) line 254:
 
ASSERT(pParentFrame == pDesktopWnd || pDesktopWnd->IsChild(pParentFrame));
 
Is there anyone who can help me? Thanks...



Replies:
Posted By: Oleg
Date Posted: 02 July 2007 at 5:37am
Hi,
 
MFC assumes that parent window of CView is CFrameWnd....
you can catch ON_WM_MOUSEACTIVATE() in your  CAdminUserView/CAdminConsView
and call CWnd base method instead CView.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: decembler
Date Posted: 02 July 2007 at 6:03am
It works, thanks a lot...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net