Hello. Thanks Mikael and Fabrizio. I'm trying to define my own "MyApplication_Application" class but I must be missing something. I've created a project with "CAS.CADE Viewer AppWizzard" with all option disable. (I still get a runtime error if I use a 2DViewer option) Then I defined my class inheriting from TDocStd_Application. I've opened the "SampleOCAF" project and made my class exact same way. I copied the code in TSampleOcaf_Application.cxx, hxx, ixx and jxx files. I've also copied Handle_TSampleOcaf_Application.hxx and the OCAF includes in stdAfx.h It worked fine until I tried to instanciate my class.
I've tried to create the object in two ways:
Handle(MyApplication_Application) = new MyApplication_Application();
Handle(TDocStd_Application) app = new MyApplication_Application ();
I got no build error but when I try to execute the application I get a "runtime error".
If I try to debug it I get: "Unhandled excepption in MyApplication.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception."
I also think all system variables are correctly set: CASROOT = D:\CASCADE CSF_GraphicShr = D:\CASCADE\windows_nt\dll\OpenGl.dll CSF_MDTVFontDirectory = D:\CASCADE\src\Textures CSF_UnitsDefinition=D:\CASCADE\src\UnitsAPI\Units.dat CSF_UnitsLexicon=D:\CASCADE\src\UnitsAPI\LexiExpr.dat DRAWDEFAULT=D:/CASCADE/DrawResources/DrawDefault DRAWHOME=D:/CASCADE/DrawResources
and added D:\CASCADE\windows_nt\dll in PATH
Can anyone help me