ListOneCurOldIndex = ListOneCurIndex;
  ListOneCurIndex++;//当前播放的文件索引           if(ListOneCurIndex >= ListInfo_One.GetSize())
  {
                 for(i=0;i<ListInfo_One.GetSize();i++)
        {
                    strPath = ListInfo_One.GetStringtAt(i);//从播放列表的链表中取文件路径
                    if(pThis->IsFileExist(strPath))//判断该路径是否存在
 {
      ListOneCurIndex = i;
                              break;
 }
        }
                 if(i==ListInfo_One.GetSize())//如果遍历整个文件链表,列表中存在的文件都不存在
       {
                          pThis->m_Edit_FlieName_One.SetWindowText("无文件发送");//显示播放参数
                          pThis->m_Edit_FileSize_One.SetWindowText("");
                          pThis->m_Edit_Rate_One.SetWindowText("");
                          pThis->m_Edit_Time_One.SetWindowText("");
                          KillTimer(pThis->m_hWnd,1);
                          pThis->m_Progress_One.SetPos(0);
                          break;
        }
                 else
        {//否则找到一个,开始设置一些参数,准备发送文件了
                        if(fp[0]!=NULL)
                            fclose(fp[0]);
                        fp[0] = fopen(strPath,"rb"); //打开新文件                        FileLength[0] = ListInfo_One.GetLenAt(ListOneCurIndex);
                        rate = ListInfo_One.GetRateAt(ListOneCurIndex);
                        time = ListInfo_One.GetTimerAt(ListOneCurIndex);
                       
                        miro_set_rate(rate,Channel_Num,DeviceNum);//设置速率                        pThis->m_Edit_FlieName_One.SetWindowText(strPath);//显示播放参数
                        str.Format("%dKB",FileLength[0]/1024);
                        pThis->m_Edit_FileSize_One.SetWindowText(str);
                        str.Format("%fMbps",rate);
                        pThis->m_Edit_Rate_One.SetWindowText(str);
                        str.Format("%ds",time);
                        pThis->m_Edit_Time_One.SetWindowText(str);                        KillTimer(pThis->m_hWnd,1);
                        pThis->m_Progress_One.SetRange(0,FileLength[0]);
                        pThis->m_Progress_One.SetPos(0);
                        if(time>=60)
                          SetTimer(pThis->m_hWnd,1,1000,NULL);
                        else
                              SetTimer(pThis->m_hWnd,1,500,NULL);
         }
   }  
            else
   {
                for(i=ListOneCurIndex;i<ListInfo_One.GetSize();i++)
       {
                        strPath = ListInfo_One.GetStringtAt(i);
                        if(pThis->IsFileExist(strPath))
      {
                             ListOneCurIndex = i;
                             break;
       }
       }
                if(i == ListInfo_One.GetSize())
       {
                      for(j=0;j<ListOneCurIndex;j++)
    {
                           strPath = ListInfo_One.GetStringtAt(j);
                           if(pThis->IsFileExist(strPath))
{
                                 ListOneCurIndex = j;
                                 break;
}
     }
                       if(j==ListOneCurIndex)
    {
                            pThis->m_Edit_FlieName_One.SetWindowText("无文件发送");//显示播放参数
                            pThis->m_Edit_FileSize_One.SetWindowText("");
                            pThis->m_Edit_Rate_One.SetWindowText("");
                            pThis->m_Edit_Time_One.SetWindowText("");
                            KillTimer(pThis->m_hWnd,1);
                            pThis->m_Progress_One.SetPos(0);
                            break;
    }
}
                  if(fp[0]!=NULL)
                       fclose(fp[0]);
                    fp[0] = fopen(strPath,"rb"); 
                    FileLength[0] = ListInfo_One.GetLenAt(ListOneCurIndex);
                    rate = ListInfo_One.GetRateAt(ListOneCurIndex);
                    time = ListInfo_One.GetTimerAt(ListOneCurIndex);                    miro_set_rate(rate,Channel_Num,DeviceNum);                    pThis->m_Edit_FlieName_One.SetWindowText(strPath);
                    str.Format("%dKB",FileLength[0]/1024);
                    pThis->m_Edit_FileSize_One.SetWindowText(str);
                    str.Format("%fMbps",rate);
                    pThis->m_Edit_Rate_One.SetWindowText(str);
                    str.Format("%ds",time);
                    pThis->m_Edit_Time_One.SetWindowText(str);
     
                    KillTimer(pThis->m_hWnd,1);
                    pThis->m_Progress_One.SetRange(0,FileLength[0]);
                    pThis->m_Progress_One.SetPos(0);
                    if(time>=60)
                         SetTimer(pThis->m_hWnd,1,1000,NULL);
                    else
                         SetTimer(pThis->m_hWnd,1,500,NULL);
      }我是这样处理的,这样处理很笨,大家有更好的吗,建议下: