//生成3个模板
CMultiDocTemplate* pDocTemplate1;
CMultiDocTemplate* pDocTemplate2;
CMultiDocTemplate* pDocTemplate3;//分别连上相应的框架\视图\文档
           pDocTemplate1 = new CMultiDocTemplate(
IDR_WWTYPE,
RUNTIME_CLASS(CWwDoc1),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMy1View));
//加入
AddDocTemplate(pDocTemplate1);             pDocTemplate2 = new CMultiDocTemplate(
IDR_WWTYPE,
RUNTIME_CLASS(CWwDoc2),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMy2View));
//加入
AddDocTemplate(pDocTemplate2);pDocTemplate3 = new CMultiDocTemplate(
IDR_WWTYPE,
RUNTIME_CLASS(CWwDoc3),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMy3View));
//加入
AddDocTemplate(pDocTemplate3);