Код: Выделить всё
void App::OnDocumentA()
{
CDocTemplate* curTemplate;
CString str;
BOOLEAN bFound;
bFound = FALSE;
while ((curTemplatePos != NULL) && (!bFound))
{
curTemplate = GetNextDocTemplate(curTemplatePos);
curTemplate->GetDocString(str, CDocTemplate::docName);
if (str == _T("Stories"))
{
curTemplate->CloseAllDocuments(FALSE);
curTemplate->OpenDocumentFile(NULL);
bFound = TRUE;
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... iew-exists
Мобильная версия