On Feb 20, 7:46 pm, "Ajay Kalra" <ajayka...@yahoo.com> wrote:
Does CDocTemplate(CSingleDocTemplate/CMultiDocTemplate) could have
multiple Docs in it?
For MDI app, you can have multiple documents for a given doctemplate.
SDI is designed to have a single document.
If it is type of different Docs then how could i declare it in
myApp::InitInstance()???
What does this mean? Why is this an issue? Why do you want to declare
these in InitInstance?
---
Ajay
What does this mean? Why is this an issue? Why do you want to declare
these in InitInstance?
My Question is: can i declare more than one View for a Doc in
CMultiDocTemplate ctor itself?
CWinApp::InitInstance()
{
CMultiDocTemplate* pDocTemplate = new CMultiDocTemplate(
IDR_MDISQRTYPE,
RUNTIME_CLASS(CMDISqrsDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMDISqrsView));
AddDocTemplate(pDocTemplate);
}
or i need to do another
new CMultiDocTemplate(IDR, , CMyView, ) and need to register
it with App?
MFC provides CreateNewFrame method to do this. Here is the relevant