Showing contents of a Dir

This is a discussion on Showing contents of a Dir within the Windows Programming forums, part of the Platform Specific Boards category; I'm looking for a way to show the contents of a selected directory in a dialog program using VC60. I'm ...

  1. #1
    Registered User Ray Schmidt's Avatar
    Join Date
    Feb 2003
    Posts
    17

    Question Showing contents of a Dir

    I'm looking for a way to show the contents of a selected directory in a dialog program using VC60. I'm thinking via use of the system command with a ListBox, however I've never done this yet. Can anyone hook me up with some help / ideas to get me in the right direction.

    Thanks,
    Ray Schmdit

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    MFC or API dialog app?

    Do you just want to show dir contents or do you maybe need a fileopen dialog? Why fill a listbox with dir contents. How you planning to use it? Windows provides come common dialogs for opening and saving files. these going to be any use to you?
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User Ray Schmidt's Avatar
    Join Date
    Feb 2003
    Posts
    17

    MFC

    I'm using MFC and have a structred dialog format for keying in the desired file. I just need the listing of files in a given directory.

  4. #4
    Registered User johnnie2's Avatar
    Join Date
    Aug 2001
    Posts
    186
    Look into FindFirstFile("*.*", ...) and FindNextFile().
    "Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Here is one I made earlier...
    Attached Files Attached Files
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  2. Replies: 12
    Last Post: 04-25-2007, 02:48 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. combining file contents with command line
    By pxleyes in forum C Programming
    Replies: 4
    Last Post: 04-12-2004, 10:27 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21