Print Page | Close Window

CXTTabCtel

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=8947
Printed Date: 14 November 2025 at 8:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTTabCtel
Posted By: deflect
Subject: CXTTabCtel
Date Posted: 28 November 2007 at 11:41pm
 
Hi~,
 
My dialog have CXTTabCtrl in it, and three formview attatched to that
CXTTabCtrl. (Formviews have several controls like checkbox, etc...)
 
I think it's very simple code...but it has problem with TabCtrl.
 
Active the dialog, it displayed with no problem, but when I click a formview
in tabctrl, "debug assertion failed" has occured...omg...
 
How can I get rid of that debug assertion failed message?
 
Ofcourse, in release mode, debug assertion failed message do
not poped up but still have problem with themes.
 
Debug break activate below line...
 
int CView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
 int nResult = CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
 if (nResult == MA_NOACTIVATE || nResult == MA_NOACTIVATEANDEAT)
  return nResult;   // frame does not want to activate
 CFrameWnd* pParentFrame = GetParentFrame();
 if (pParentFrame != NULL)
 {
  // eat it if this will cause activation
 
  //this line!!!!
  ASSERT(pParentFrame == pDesktopWnd || pDesktopWnd->IsChild(pParentFrame));
  // either re-activate the current view, or set this view to be active
  CView* pView = pParentFrame->GetActiveView();
  ....
  ...
}
 
 
void CFrameWnd::SetActiveView(CView* pViewNew, BOOL bNotify)
{
#ifdef _DEBUG
 if (pViewNew != NULL)
 {
  ASSERT(IsChild(pViewNew));
  ASSERT_KINDOF(CView, pViewNew);  <- this line!!!
 }
 
....
....
 
 
What problem do I have?
 
thank you.



Replies:
Posted By: Oleg
Date Posted: 29 November 2007 at 1:01am
Hi,
 
In our sample we catch WM_MOUSEACTIVATE and don't call base maethod:
 
...
 ON_WM_MOUSEACTIVATE()
...
 
int CTabbedViewView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
 return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
}


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


Posted By: deflect
Date Posted: 29 November 2007 at 1:23am
Thank you, Oleg,
 
Instead using CFormView::OnMouseActivate(...), I type the code like
"CWnd::OnMouseActivate(...)", then debug assertion failed message box does not poped up :)
 
but still I don't know correct reason of that...
 
emmm...anyway, thank you again.



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