как запретить вовторный вызов MDIChild окна создаю: Код | //0.Форма - Журнал документов {pDocTemplate = new CMultiDocTemplate( IDI_JURNAL, RUNTIME_CLASS(/*CLeaseDoc*/CGridDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CReferenceForm)); AddDocTemplate(pDocTemplate);}
//1.Форма - Документы.Создать договор {pDocTemplate = new CMultiDocTemplate( IDI_NEWDOGOVOR, RUNTIME_CLASS(CLeaseDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CDogovorView)); AddDocTemplate(pDocTemplate);}
//2.Форма - Справочник: Вид Объекта {pDocTemplate = new CMultiDocTemplate( IDR_LEASETYPE, RUNTIME_CLASS(CLeaseDoc), RUNTIME_CLASS(CChildFrame), RUNTIME_CLASS(CTypeOfObject)); AddDocTemplate(pDocTemplate);} |
вызываю: Код | CDocTemplate* pDocTemplate; POSITION pos = AfxGetApp()->GetFirstDocTemplatePosition(); for (int i = 0; i < 3; i++) pDocTemplate = (CDocTemplate*) AfxGetApp()->GetNextDocTemplate(pos); pDocTemplate->OpenDocumentFile(NULL); |
чтобы такое вписать в вызов, чтобы окно не открывалось если есть, а становилось активным
|