|
|
|
|
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.
Subject |
Author |
Date |
|
David Sousa
|
Oct 22, 2006 - 7:37 PM
|
I am using the Unicode Debug build of version 2.60 in an MFC exe application, and the Unicode Debug RDE build in an MFC regular dll.
I have written a class that extends CExtGridCellString. The new class is part of an MFC regular dll. I have used CExt_ProfUIS_ModuleState::InitExtension( AfxGetStaticModuleState() ); in the InitInstance method and called AFX_MANAGE_STATE. The MFC exe that uses the new MFC DLL project compiles and links fine. However, when I run the application I am receiving an assertion at line 41530 in ExtGridCell.cpp. This is the assertion that fails:
ASSERT( pInitRTC->IsDerivedFrom(RUNTIME_CLASS(CExtGridCell)) );
I’m not sure what I am missing. Is there a sample MFC dll project that uses Prof UI that I could get so that I can make sure that all of my settings are OK?
Thanks,
Dave
|
|
David Sousa
|
Oct 23, 2006 - 10:57 AM
|
I switched the project to an MFC extension dll, and it works fine. This will work for us, since the dll will only be included in an MFC application.
I think that it would still be a good idea to have a sample project that uses Prof UIS in a regular MFC dll for future reference.
|
|
Technical Support
|
Oct 23, 2006 - 8:18 AM
|
Please ensure your grid cell class has the following lines in scope of class declaration: DECLARE_SERIAL( CYourGridCell );
IMPLEMENT_ExtGridCell_Clone( CYourGridCell, CExtGridCellString ); and the following line in the .cpp file: IMPLEMENT_SERIAL( CYourGridCell, CExtGridCellString, VERSIONABLE_SCHEMA|1 ); The last line should be placed at the top of the source file before the DEBUG_NEW symbol is defined. Alternatively, the assertion described in your message can occur if you forgot to manage MFC state at the beginning of the exported method or function.
|
|
David Sousa
|
Oct 23, 2006 - 10:25 AM
|
Thanks for your reply. I had already included the code that you indicated in your response. I had put the AFX_MANAGE_STATE macro in all public methods of the class. I used _declspec(dllexport) on the class.
The assertion happens on the following line in the MFC exe application when trying to add a timeline cell to the grid:
CExtGridCellTimeLine * pCellTimeLine = STATIC_DOWNCAST( CExtGridCellTimeLine, m_wndGrid.GridCellGet( GRID_COL_TIMELINE, rowNo, 0, 0, RUNTIME_CLASS(CExtGridCellTimeLine) ) );
I sent the MFC dll project to the technical support email address.
|
|