![]() |
CXTTabCtel |
Post Reply
|
| Author | |
deflect
Newbie
Joined: 27 November 2007 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTTabCtelPosted: 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.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
deflect
Newbie
Joined: 27 November 2007 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |