News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

GetOpenFileName

Started by RedXVII, October 29, 2006, 12:27:50 AM

Previous topic - Next topic

RedXVII

Run into a little trouble here. I'm using the GetOpenFileName function as in iczelions tutorials #12. I however want to get a folder (the path to a directory) from the user, not a file. I checked msdn on this and it says very little about folders  :eek  .Anyone know how to do this?

Cheers
RedXVII  :U

Ehtyar

SHBrowseForFolder is the function you are looking for. As it is such a rediculously complex function, i suggest using the function from masm32.lib, BrowseForFolder. If you wish to use the BIF_USENEWUI flag (i suggest doing so) simply copy the BrowseForFolder function from the masm lib source directory, rename it and add it to your own source file, add the flag, and call OleInitialize or CoInitialize before invoking the function (you'll have to link with ole32.lib).

Hope this helps, and feel free to post any more questions.

Regards, Ehtyar.

P.S. The MSDN search function is PATHETIC. If you have any problems finding an api on there, better to search here before spending too long on google or MSDN.

jdoe


RedXVII,

Look at GeneSys project from this board. I coded a BrowseForFolder function that I think is quiet good for any general and advanced needs.

:U