Print Page | Close Window

ASSERT failure on startup

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=244
Printed Date: 23 December 2024 at 3:46am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ASSERT failure on startup
Posted By: Matt1
Subject: ASSERT failure on startup
Date Posted: 13 November 2003 at 7:55pm

Hi, I'm using the CXTPTabClientWnd class in my MainFrame to add MDI tabs.  I'm calling:

    m_MDITabWnd.Attach(this);

in my OnCreate() handler, and:

    m_MDITabWnd.Detach();

in my OnDestroy() handler.  It works very well, except that debug compiles ASSERT at startup and point to line 1971 in XTPTabClientWnd.cpp:

    // there shouldn't be such item in the tab control
    ASSERT(m_tab.FindTabItem((HWND)lResult)==-1);

Any idea why this is failing and how I can fix it?  It happens in the demos that use this class as well, btw.  I'm using a static-mt  build of the XTP lib and I'm statically linking to MFC.

Matt

Edit: It's actually failing during ChildWnd creation. Any ideas?
 




Replies:
Posted By: Matt1
Date Posted: 14 November 2003 at 2:52am

OK, it seems that some of my code was causing this problem.  I was forcing my ChildFrame windows to stay maximized by catching SIZE_MINIMIZED and SIZE_RESTORED messages in my ChildFrame's OnSize() handler, and programmatically remaximizing the window when those two messages appeared. I have no idea why this was causing the CXTPTabClientWnd code to throw an assertion but apparently it was. So I eliminated that code - it was hackish anyway.

I've resolved the keep-maximized problem by eliminating all the ways a user might reduce the ChildFrame windows within the application (I removed the Min/Max buttons from the windows, the CXTPTabClientWnd window, and I removed the Window menu commands.

The only problem I have now relates, then, to kelvincannon's post "Tabbed MDI" and is this:

When my ChildFrame windows are maximized (which they are by default and are meant to STAY that way) and I click the tabs to activate them and bring them to the front, there is a brief flicker of those windows in a non-maximized state.

Is there any way that I can eliminate this? I suppose I'm officially reporting a bug, unless there is something I'm doing wrong.

- Matt




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