xcall MIAMEX, MX_BROWSEFOLDER, folder, rootID, title, flags
MX_BROWSEFOLDER (MIAMEX 170) 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). This operation can only take place on a GUI-enabled client—either ATE or A-Shell/Windows.
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.
This function has both a subroutine and a print tab implementation.
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 (Num) [in]
specifies a root folder, above which the user would not be able to navigate, using the standard CSIDL_xxx identifiers.
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 (Num)
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 |
Definition file: ashell.def |
See Also
• | AG_BROWSEFOLDER for the equivalent Print Tab command. |
• | MX_GETOFD to browse for an select files. |
• | The sample program MIAMEX.BP in EXLIB:[908,30] for an example of this function. |