In a wizard-generated MFC app, the framework generates code to open documents when the user opens a document or creates a new one.
What I want to do is automatically creating a document (and subsequntly display it) as a result of a given operation.
Unfortunately, I fail to find the right sequence of operations. Is it sth like :
CMyDoc *pDoc = new CMyDoc(blah,blah)
or rather :
pDoc = pDocTemplate->CreateNewDocument()
I always get a bunch of errors in CreateNewFrame. Possibly my CDocument instance is not initialized correctly : is it my business to initialize the view/ the frame ?
I can't just send a message IDD_FILE_NEW beacuse I need to provide some parameters for the creation of the very document.
Thanks for any hints !