|
|
|
|
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 |
|
Simon DESEE
|
Jan 5, 2006 - 4:16 AM
|
Hi all, I see the DRAWCLI sample to add the "custom site" functionnality to my application. All of my resource identifier are correct (controlled with Resource Organizer by Riverblade). But many assertions apperas when I call the function :
VERIFY(CExtCustomizeSite::MenuInfoAdd( this, _T("Default"), IDR_MAINFRAME, true, false, RUNTIME_CLASS(CMainFrame)));The text on the output window is :
Warning: Cannot load CExtCustomizeCmdTreeNode from archive. Class not defined.
CArchive exception: badClass.
First-chance exception at 0x77e9bc3f in MyProg.exe: Microsoft C++ exception: CArchiveException at memory location 0x0012f048..
And Visual Studio stops execution at the function :
CExtCustomizeCmdTreeNode * CExtCustomizeCmdTreeNode::CloneNode()
How can I correct this ? (I’m using Prof-uis 2.52 full edition)
Thanks a lot.
|
|
Technical Support
|
Jan 5, 2006 - 5:26 AM
|
DrawCli is a customizable application, so, if you changed some toolbars or menu bars you need to clear the registry data (relating to this sample) so that the changes take effect. In your case, the application reads data describing the menu bar items from the registry and tries to apply these data to the initial menu bar which, in fact, is already changed by you and the changes cannot by applied.
|
|
Simon DESEE
|
Jan 5, 2006 - 5:54 AM
|
What changes of my menu bar do you think about ? The error occur when the first load of my application. After calling MenuInfoAdd, MenuInfoLoadAccelTable, EnableCustomization, ..., I call the CExtCustomizeSite::CustomizeStateSerialize(ar) function. But the program stops on the first function called (MenuInfoAdd). When DRAWCLI is started for the first time, there is no information on the registry. My application use files to store UI information. Does the customization working only with the registry ? Can you send me a sample (more simple than DRAWCLI) with customization and UI state stored on a single file ? Regards, Simon DESEE
|
|
Technical Support
|
Jan 5, 2006 - 10:36 AM
|
Could you let us take a look at the entire call stack window. We know the assertion may occur even in 2.52 if you are using Prof-UIS as a static library and your project has some variables of Prof-UIS classes defined globally. In this case, these variables must be initialized before the g_PaintManager global variable is initialized in Prof-UIS. This may explain the errors like described in your message. Please check this issue.
|
|
Simon DESEE
|
Aug 15, 2006 - 4:18 AM
|
My problem is solved.
I need to create my CArchive with the CFile::modeCreate | CFile::modeNoTruncate | CFile::modeReadWrite flags for the loading process.
And storing data on a different file than the status file.
Thanks
|
|