views:

76

answers:

3

I found all the code I need to make SHBrowseForFolder work in my application. But I hate that it forces you to do everything in the little folder window, without a text box to navigate by typing.

In Windows, I know I commonly see a different folder browse dialog that does let me type folder names and use the other regular navigation keys to get around to select the desired folder (backspace, "..", Enter, and so on).

Is there a different API call for that?

A: 

No, you have to do something like this: SelectDialog - A Multiple File and Folder Select Dialog (http://beta.codeproject.com/KB/MFC/SelectDialog.aspx)

Windows programmer
While that tool looks cool, it's not really what I asked for. It IS possible to get what I asked for, so your answer is, well, wrong.
Emtucifor
You are right, I misinterpreted what you were asking for. By the way since you can get the source for that tool you can limit it to only let the user select one folder, so you can get what you asked for, but yes for your purposes it's overkill.
Windows programmer
+1  A: 

When you call SHBrowseForFolder you just need to add the BIF_EDITBOX flag to the ulFlags field.

Craig Peterson
+1  A: 

Try this:

a.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE | BIF_EDITBOX;
Brian R. Bondy
Thanks! I had dinner and then when I got back to work I decided I'd just move forward with the old dialog. Then I found the answer, too. But you were first and complete. Thanks.
Emtucifor