Thread: dialogue box code - more help needed please

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    23

    dialogue box code - more help needed please

    Hi, I got some help when I asked about this a couple weeks ago, but it's difficult, I need the code for browsing files/folders.
    I've sorted out the Get/SetCurrentDirectory, I've also been able to get it to show the files in the current folder, I've also played around with the (\\ and .. ) but I still can't get the hang of going up the tree and down again.

    This is more or less what I've got/think at the moment;

    1)GetCurrentDirectory
    2)Somehow parse that and put extra backslashes -thats one of the hard bits for me.
    3)Send that to FindFirstFIle / FindNextFile
    4)Separate directories from foders using the File attributes thing -I can just about do that.
    5)I was also going to make some sort of copy of the directories names into an array so that to do a new search (go to another directory) I could just put in the array number for that folder, thats because I'm using a console at the moment, (I can't just click on it).

    Thanks

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    What is the end result you are trying to achieve?

    gg

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    Is this some kind of file searcher? If not, then please explain.

    If so, then why not just use a recursive routine using findfirst/findnext? It would be simplest way to do it.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    23
    sorry I won't be able to say all i want as I'm just about out of connection time.
    I'm trying to do just a normal explorer browse thing, I think I've got a way of doing it now though, I think I could just get by with adding strings together, when you get to the top of a tree and you want to look in another folder just add that as a string to the FindFirst/FindNext.
    Thanks though

    ps I think I kind if just called it a file search, it is sort of like searching files?

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help needed with game code
    By cakestler in forum C Programming
    Replies: 10
    Last Post: 03-13-2009, 04:28 PM
  2. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 08:34 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum C Programming
    Replies: 0
    Last Post: 10-03-2002, 03:04 PM
  4. Source Code Needed!
    By spongleman in forum C++ Programming
    Replies: 1
    Last Post: 01-02-2002, 08:14 PM
  5. Source Code Needed
    By spongleman in forum Game Programming
    Replies: 0
    Last Post: 01-02-2002, 05:23 PM