OCAF OnNewDocument() problem

I have changed a MDI OCAF program to a SDI OCAF program, very things are OK, but when I click the new document button ,the program is collapse.
In the OnNewDocument(),it only have:
Handle_OcafApplication appli= ((CXXXApp *)AfxGetApp())->GetOCAFApp(), and appli->NewDocument("yyy", OCAFDoc),just as the wizard did.
Can someone help me! Thank you very much.

sergey zaritchny's picture

The best way to understand is to debug the sample. It will make you more friendly with Open CaCade.
1. Try to run the sample (I suppose you are speaking about OCAF standard sample: ..\samples\standard\mfc\10_Ocaf) without changes.
2. Take into account that the string: "yyy" you are referring in your example means format name to be registered at file "Resources"
3.If standard version works well (it should work!), find differences between standard sample implementation and your own implementation.

Good luck.