CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 1999
    Location
    Austria
    Posts
    56

    directory reading

    I need in an elder project (developed under VCC 1.5 I can t change it for some dll reasons)the content of a directory

    CListBox ListBox;
    LPSTR Path;
    int Zero;
    CString DirName;
    Path = "C:\\TRANSFER\\*.*";
    UINT attr = 0x0000;

    ListBox.Dir(attr,Path);

    Zero = ListBox.GetCount();

    But I got always NULL so where is the bug??
    Any help is welcomed
    Long



  2. #2
    Join Date
    Oct 2000
    Location
    India
    Posts
    4,620

    Re: directory reading

    Hi,

    CListBox *ListBox;
    ListBox = (CListBox *)GetDlgItem(IDC_LIST1);
    /* IDC_LIST1 is the ID of the list box that you have created in the dialog */
    LPSTR Path;
    int Zero = 0;
    Path = "C:\\Transfer\\*.*";
    UINT attr = 0x0000;
    ListBox->Dir(attr,Path);
    Zero = ListBox->GetCount();



    [b]Let me know if that helped.
    Visit http://www.geocities.com/contactgirish/homepage.html for some VC++ Links & Notes.If you have time, you can sign the guest book there.
    Regards,
    V.Girish
    All luck and have a great day.

    Regards,
    V.Girish

    Visit www.geocities.com/contactgirish for Source code, Tutorials, FAQs and Downloads.

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