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

ASSERT failure on startup

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


Joined: 06 November 2003
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt1 Quote  Post ReplyReply Direct Link To This Post Topic: ASSERT failure on startup
    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?
 



Edited by Matt1
Back to Top
Matt1 View Drop Down
Newbie
Newbie


Joined: 06 November 2003
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt1 Quote  Post ReplyReply Direct Link To This Post 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

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.172 seconds.