void CEditListEditor::OpenFile(LPCTSTR lpFileName) { CString strLine; CStdioFile editListFile; CString strUser; CString strHotFolders; CloseFile(); m_strFileName.Format(_T("%s.edl"), lpFileName); if (editListFile.Open(m_strFileName, CFile::modeRead)) { m_bFileOpen = true; while (editListFile.ReadString(strLine)) { //int nPos = 0; CString strIn; // = strLine.Tokenize(_T(" \t"), nPos); CString strOut; // = strLine.Tokenize(_T(" \t"), nPos); CString strName; // = strLine.Tokenize(_T(" \t"), nPos); AfxExtractSubString(strIn, strLine, 0, _T('\t')); AfxExtractSubString(strOut, strLine, 1, _T('\t')); AfxExtractSubString(strName, strLine, 2, _T('\t')); if (strUser.IsEmpty()) { AfxExtractSubString(strUser, strLine, 3, _T('\t')); SelectCombo(strUser, m_cbUsers); } if (strHotFolders.IsEmpty()) { AfxExtractSubString(strHotFolders, strLine, 4, _T('\t')); SelectCombo(strHotFolders, m_cbHotFolders); } if (!strIn.IsEmpty() && !strOut.IsEmpty()) { CClip NewClip; NewClip.SetIn(strIn); NewClip.SetOut(strOut); NewClip.SetName(strName); InsertClip(nullptr, NewClip); } } editListFile.Close(); } else { m_bFileOpen = false; } if (m_nameList.IsEmpty()) { CStdioFile nameFile; CString str; if (nameFile.Open(_T("EditListNames.txt"), CFile::modeRead)) { while (nameFile.ReadString(str)) { m_nameList.Add(str); } nameFile.Close(); } } }
void CCrossDlg::OnSelchangeNameB() { SelectCombo(SEL_B); }
void CCrossDlg::OnSelchangeNameA() { SelectCombo(SEL_A); }