• Advertisement
Sign in to follow this  

Question about dialogs... [solved]

This topic is 4248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm woking on an interpreted (bytecode) programming language that I will use for scripting game AI and things. I have a semi-working IDE right now (done with C++). I would post a demo but it has a few bugs and I don't want to embarrass myself. :) My question is this: How do I prompt the user for a directory? Sort of like the file selection dialogs...but for folders instead. I want the user to be able to add directories to a list (this isn't a problem, but how do I prompt the user?). Can I use the GetOpenFilename(...) function or do I have to make a custom one? (if so, is there a good, open source one I could use?) [Edited by - ouraqt on July 5, 2006 2:12:04 AM]

Share this post


Link to post
Share on other sites
Advertisement
There are a few wrapper classes for the Common Dialogs available. You can talk to the common dialog API directly yourself if you like (full reference) or look around for an existing wrapper on Google. If you happen to be using MFC or C++/CLI, there are already wrappers available to you through those libraries.

Share this post


Link to post
Share on other sites
I'm not using MFC (I hear the libraries are slow and unoptimized - and I'm a fairly low-level dude). I did a quick Google search but I'll try again. I have a full reference to the Win32 API (MSDN!) but I think a directory picker should be part of the common dialog library. It's a pretty common thing.

I think writing one would be a fairly involved process - enumerating all the folders, writing the GUI, making it look like the normal ones in other apps, etc. We shouldn't have to do this, right?

Share this post


Link to post
Share on other sites
Whoa, Programmer16, I think that's exactly what I'm looking for. I'll do a little research to find out.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement