那个程序很大,差不多有90M,我打开的那个cpp有7000多行

解决方案 »

  1.   

    大家看看,就这块最卡了
    CString str,str_csv;
    str.Format("%-10s","序号"); //带汉字的就+1
    str_csv += str;
    str_csv +=",";
    strtemp0.Format("%-12s","编号"); //+2
    str+=strtemp0;
    str_csv += strtemp0;
    str_csv +=",";
    strtemp0.Format("%-9s","通道"); //-1
    str+=strtemp0;
    str_csv += strtemp0;
    str_csv +=",";
    strtemp0.Format("%-10s","分箱");
    str += strtemp0;
    str_csv += "bin num"; //.csv文件用
    str_csv +=",";
    CString str_item,str001;
    for (int i=0;i<dut_file.test_item_number;i++)
    {
    str_item.Format("%-10s",test_item[i].name);
    if((dut_file.type == 3) && (test_item[i].parameter==3))
    str_item.Format("%-15s","RDSON/VDSON");
    else if((dut_file.type == 4) && (test_item[i].parameter==2))
    str_item.Format("%-15s","VGT/IGT");
    str001 = str_item;
    if((dut_file.type == 5) && (test_item[i].parameter==3))
    {
    str_item.Format("%-15s","Ron/Vod");
    str001.Format("%-15s","Ron,Vod");
    }
    else if((dut_file.type == 5) && (test_item[i].parameter==4))
    {
    str_item.Format("%-10s","Ii");//  /Ri
    str001.Format("%-10s","Ii");//  /Ri
    }
    str += str_item;
    str_csv += str001; //.csv文件用str_item
    str_csv +=",";
    }
    str_item.Format("%-s","Time"); //10
    str += str_item;
    str +="\n"; //结果显示第一行,参数列表
    str_csv += str_item; //.csv文件用
    str_csv +="\r\n"; //换行
    str_single_result_csv.Insert(0, str_csv); m_richedit_unit.SetSel(-1,-1);
    m_richedit_unit.ReplaceSel(str);