Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTTabCtel
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTTabCtel

 Post Reply Post Reply
Author
Message
deflect View Drop Down
Newbie
Newbie


Joined: 27 November 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote deflect Quote  Post ReplyReply Direct Link To This Post Topic: CXTTabCtel
    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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
deflect View Drop Down
Newbie
Newbie


Joined: 27 November 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote deflect Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.