mdi help
-
I have a question, obviously, I have a MDI application with three different document templates. I simply want to launch a specific one from a menu option. How would one go about launching a certain document/view? Thanks Michael Shuster the 1st
-
I have a question, obviously, I have a MDI application with three different document templates. I simply want to launch a specific one from a menu option. How would one go about launching a certain document/view? Thanks Michael Shuster the 1st
-
I acutally got that far, I jsut do not know what to use for a parameter. It is asking for a path name string but i want to load a template. Forgive me if I am missing something obvious
-
I acutally got that far, I jsut do not know what to use for a parameter. It is asking for a path name string but i want to load a template. Forgive me if I am missing something obvious
Call CDocTemplate::OpenDocumentFile and pass it NULL. The MSDN says this causes it to create a new document. Chris Richardson C/C++ Include Finder[^]
-
Call CDocTemplate::OpenDocumentFile and pass it NULL. The MSDN says this causes it to create a new document. Chris Richardson C/C++ Include Finder[^]
hmmm, that did not seem to work. I can not pass it the value of Null. It returns the following error: error C2512: 'CDocTemplate' : no appropriate default constructor available Plus I want to actually pick which document templat opens. I have three, and I want a specific one to open. Any other suggestions or maybe you could refer me to where you read that at.
-
hmmm, that did not seem to work. I can not pass it the value of Null. It returns the following error: error C2512: 'CDocTemplate' : no appropriate default constructor available Plus I want to actually pick which document templat opens. I have three, and I want a specific one to open. Any other suggestions or maybe you could refer me to where you read that at.
Sounds like you need to make use of the undocumented MFC class CDocManager. When you call AddDocTemplate() in InitInstance(), the template pointer is handed off to the m_pDocManager object, which is part of your CWinApp object. You can use this to iterate the CDocTemplates registered in your application and call OpenDocumentFile(NULL) on your CMultiDocTemplate object. This should create an empty document of the required type. See MFC files DOCMULTI.CPP line 114 and DOCSINGL.CPP line 88 for the functions in question. Roger Allen Sonork 100.10016 WHats brown and sticky? A stick or some smelly stuff!