C++编译的文本编辑器
}
}
::DragFinish (hDropInfo); //释放内存 i=0;
delete []lpszFileName;
void CEasyTXTDlg::OpenFile() {
CString strCmdLine = GetCommandLine(); int totalLen = strCmdLine.GetLength(); int i = 0;
int index = 0;//循环统计字符个数
for (i = 0,index = 0; i < 3; i++,index ++) { }
if (index != 0) {
for (i = index;i < totalLen - 1;i ++)
SavePath += strCmdLine.GetAt(i); int n = SavePath.ReverseFind('.');
CString stl = SavePath.Right(SavePath.GetLength() - n - 1);
if (stl == "txt" || stl == "TXT" || stl == "c" || stl == "C" || stl == {
CString strText;
CFile file(SavePath,CFile::modeReadWrite); //以读与写方式打开文件 char read[50000];
file.Read(read,50000); //读取文件内容 for(unsigned i=0;i<file.GetLength();i++) {
strText += read[i];//把文件内容赋值给CString变量
index = strCmdLine.Find("\"", index); //查找字符串
"cpp" || stl == "CPP"
|| stl == "h" || stl == "H" || stl == "xml" || stl == "XML" || stl
== "html" || stl == "HTML")
}