Skip to main content
GameDev.net gamedev.net
🔒 Locked

Directory Viewing

Started by Reactivore Jun 30, 2000 at 2:13 PM 3 replies 250+ views
Original Post
Reactivore
Reactivore
This is probably a really dumb question, but I am developing a GUI for my application in DX, and I have come to the point where I need a file viewing window, so that I can get the location string of a user selected file and use it to open the file. However, since this is in my GUI, I am trying not to use any windows functions that would bring up an open dialogue box. I am just trying to get a function (or any way really) that will give me directory listings so that I can make my own dialogue box, like in nesticle (a nintendo emulator). I am using VC++ 6. Thanks guys. Looking forward to hearing what you have to say.
Great Milenko
Great Milenko
try looking up the function int system(char*)... if you want a directory of say the root of c: then do it like this...

system("dir c:\ >dir.out");

this will call dir give it c:\ as a param and then put the output in a file called dir.out then you can look through that file for the dir listing =)

Great Milenko

Words Of Wisdom:
"Never Stick A Pretzel In Your Butt It Might Break Off In There."


http://www.crosswinds.net/~milenko
http://www.crosswinds.net/~pirotech

The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
Reactivore
Reactivore
Thanks guys. I''m not really trying to find a specific file, so the second way I don''t think will work for me, but the first way sounds good. I''m kind of wondering if that''s the way nesticle or UT, or any other GUI based game really does it, but I guess it should work for me.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.