xcall MIAMEX, MX_BROWSEFOLDER, folder, rootID, title, flags
Displays a standard Windows dialog allowing you to browse for and select a folder or other non-file object (such as a computer or device).
Note that if the initial path or directory is in the form of a drive letter and colon with no trailing slash (e.g. "C:"), MX_BROWSEFOLDER automatically appends "\" to avoid confusion. (Such ambiguous specs are otherwise likely to be misinterpreted by A-Shell and/or Windows.)
Also see:
• | MX_GETOFD (browse for an select files) |
• | The MIAMEX.BP sample program in [908,30] of the EXLIB for an example of this function. |
Parameters
folder (string) [in/out]
returns the selected folder (or null if user cancelled). On input specifies the default folder. Note even when the RootID parameter is specified, this default folder specification must be absolute (i.e. not relative to the RootID). But it must specify a folder on or below that RootID folder.
rootID (numb) [in]
may be used to specify a root folder, above which the user would not be able to navigate. May be any single one of the standard Windows directory CSIDL_xxx identifiers, the most typically useful of which is CSIDL_APPDATA. See the Appendix "CSIDL_xxx identifiers" in the XCALL Reference for a list of values.
title (string,in)
specifies the title message which appears in the dialog box. There is room for 2 or 3 lines of text, which will be auto-wrapped as needed.
flags (Numeric)
Flag |
Value |
Description |
---|---|---|
BIF_RETURNONLYFSDIRS |
&h0001 |
Return only file system folders |
BIF_DONTGOBELOWDOMAIN |
&h0002 |
Don't include network folders below the domain level |
BIF_RETURNFSANCESTORS |
&h0008 |
Only return file system ancestors |
BIF_EDITBOX |
&h0010 |
Include an edit control in the dialog to allow user to type a path |
BIF_VALIDATE |
&h0020 |
Don't allow user to type an invalid name in the edit box |
BIF_NEWDIALOGSTYLE |
&h0040 |
New style of dialog; offers several enhancements over original style (resizing, drag/drop, new folder button, delete, etc.) |
BIF_USENEWUI |
&h0050 |
Combination of BIF_NEWDIALOGSTYLE and BIF_EDITBOX |
BIF_BROWSEINCLUDEURLS |
&h0080 |
Allow display of URLs (requires BIF_USERNEWUI + BIF_BROWSEINCLUDEFILES) |
BIF_UAHINT |
&h0100 |
With BIF_NEWDIALOGSTYLE and not BIF_EDITBOX, displays a standard hint to the user in place of the edit box. |
BIF_NONEWFOLDERBUTTON |
&h0200 |
Eliminates the "New Folder" button |
BIF_KBDLOCKLATETARGETS |
&h0400 |
Don't traverse target as shortcut |
BIF_BROWSEFORCOMPUTER |
&h1000 |
Only allow selection of computers |
BIF_BROWSEFORPRINTER |
&h2000 |
Only allow selection of printers. Automatically sets the RootID to CSIDL_PRINTERS unless RootID is already non-zero. |
BIF_BROWSEINCLUDEFILES |
&h4000 |
Dialog displays files as well as folders |
BIF_SHAREABLE |
&h8000 |
Dialog can display shareable resources on remote systems |