CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2002
    Posts
    28

    Why dont it work???

    Why don't the following funktions don't work???

    int CSearch::SucheDateien(CString nextdir)
    {
    CString curdir = nextdir;
    CString appname;
    CString ftpfilename;
    CString winfilename;

    m_Ordner = nextdir;

    CFileFind ftpFind;

    BOOL bContinue = ftpFind.FindFile(curdir + "\\*.*");

    while (bContinue > 0)
    {
    bContinue = ftpFind.FindNextFile();
    appname = ftpFind.GetFileName();

    if (appname == "." || appname == "..")
    {
    }
    else
    {
    if (ftpFind.IsDirectory() != 0)
    {
    nextdir = curdir + "\\" + appname;
    SucheDateien(nextdir);
    }
    else
    {
    if (m_filename.Find("*") == -1)
    {
    ID3_Tag myTag;
    myTag.Link ("appname");

    ID3_Frame *myFrame;

    if (myFrame = myTag.Find(ID3FID_TITLE))
    {
    char title[1024];
    myFrame->Field(ID3FN_TEXT).Get(title, 1024);
    MessageBox(title);
    }
    }
    }
    }
    }

    ftpFind.Close();

    return 1;

    }




    I open the directory with this code

    void CSearch::OnOpen()
    {
    // TODO: Code für die Behandlungsroutine der Steuerelement-Benachrichtigung hier einfügen
    CDirDialog ordner;

    ordner.m_strTitle = _T("Wählen Sie einen Ordner aus ...");

    ordner.DoBrowse();

    m_Ordner = ordner.m_strPath;
    UpdateData(FALSE);

    }

    it will realy work!!


  2. #2
    Join Date
    Aug 2001
    Location
    North Bend, WA
    Posts
    1,947

    Re: Why dont it work???

    What is it supposed to do?
    What does it do that you don't like?


  3. #3
    Join Date
    Jan 2002
    Posts
    28

    Re: Why dont it work???

    It scans a directory for files and then I will ever File get to the following function:

    ID3_Tag myTag;
    myTag.Link(ftpFind.GetFilePath());//Here must stand the filename with path or not with path??

    ID3_Frame *myFrame;

    if (myFrame = myTag.Find(ID3FID_TITLE))
    {
    char title[1024];
    myFrame->Field(ID3FN_TEXT).Get(title, 1024);
    MessageBox(title);
    }
    }



    the function reads the tags in mp3files.

    here:
    myTag.Link(ftpFind.GetFilePath()/* must stand the filename*/);


  4. #4
    Join Date
    Aug 2001
    Location
    North Bend, WA
    Posts
    1,947

    Re: Why dont it work???

    So what goes wrong?


  5. #5
    Join Date
    Jan 2002
    Posts
    28

    Re: Why dont it work???

    It works I found the fault!!! Sorry


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured