用dephi怎么样打开多个文件,就象豪杰一样有个播放多个文件的功能

解决方案 »

  1.   

    我仿Winamp做了一个播放器,需要源码和我联系,我的Email:[email protected]
      

  2.   

    我这儿有个例子:
    FILE *stream;
        char Line[512];    OpenDialog1->Options.Clear();
        OpenDialog1->Options << ofAllowMultiSelect << ofFileMustExist;
        OpenDialog1->Filter = "文本文件 (*.txt)|*.txt|所有文件 (*.*)|*.*";
        OpenDialog1->FilterIndex = 2;
        if (OpenDialog1->Execute())
        {
            for (int I = 0;I < OpenDialog1->Files->Count;I++)
            {
                stream = fopen(OpenDialog1->Files->Strings[I].c_str(), "r");            do
                {
                    //从文件中逐行读出
                    if(!fgets(Line,sizeof(Line),stream))  break;
                    RichEdit1->Lines->Append(Line);
                }
                while(1);
                fclose(stream);            /*//如果只读入每个文件的第一行,则代码为:
                if(stream)
                {
                    fgets(Line,sizeof(Line),stream);
                    RichEdit1->Lines->Append(Line);
                    fclose(stream);
                }*/
            }
        }把它改成Delphi就行了