Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » DEBUG ASSERTION after close application (MDI) CExtToolControlBar and CExtWRB Collapse All
Subject Author Date
Alfonso Bastias Dec 23, 2005 - 12:40 PM

Hello, I am testing your interface (free version). in order to be used y my application. (probable the PRO version).


I created a simple solution (MDI) that include:


 


MainFrm.h


CExtControlBar m_wndResizableBarEmpty;


CExtWRB < CMyView> m_MyView;


 


MainFrm.cpp


int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)


.....


if( !m_wndResizableBarEmpty.Create( NULL, // _T("Optional control bar caption"),


this,ID_VIEW_WINDOWS1))


{


TRACE0("Failed to create m_wndResizableBarEmpty\n");


return -1; // fail to create


}


if( !m_MyView.Create(NULL,"MyWindowsName",WS_CHILD|WS_VISIBLE,CRect(0,0,0,0), &m_wndResizableBarEmpty,m_wndResizableBarEmpty.GetDlgCtrlID()


))


{


TRACE0("Failed to create m_MyView\n");


return -1; // fail to create


}


...


 


Basically I create a DockWindow with a CView inside...


Everything is OK.. However when I close the application a DEBUG ASSERTION DLG is shown.


expression: _CrtIsValidHeapPointer(pUsedData).


 


 If I run the application is Release Mode... nothig happend (after close the application).


 


Thanks for your support


Alfonso


 

Alfonso Bastias Dec 23, 2005 - 1:35 PM

Thank you...


You got the solution with just a small amount of info... thanks again.. and looking forward to use the PRO version. just need to figure out more about the PROF-UIS structure and see how will fit in my application.


Regards
Alonso

Technical Support Dec 23, 2005 - 1:23 PM

There is not enough information in your message to come to any conclusion about why the memory heap is corrupted or why it is used incorrectly. But we may guess the following: the CMyView is based on some MFC’s view class (the CView class or derived from it) and you have used the CMyView type as the type of some property in the main frame window’s class. If our guess is correct, then you should note the CView class invokes delete this code in its PostNcDestroy() virtual method because all MFC view classes are designed to be created in the dynamic memory. In this case, you need to override the PostNcDestroy() virtual method in the CMyView class and make the method’s body empty.