GetFolder()
Opens
The 'Browse For Folder' System Dialog And Returns Selected Folder Path
Syntax:
GetFolder ( [<cTitle>]
, [<cInitPath>], [<cInvalidDataMsg>],
[<lNewFolderButton>] , [<lIncludeFiles>]
, [<nCSIDL_FolderType>] , [<nBIF_Flags>]
)--> cSelectedFolderName
-
nCSIDL_FolderType (constants
defined in i_misc.ch): CSIDL (Constant Special Item ID List) values provide a
unique system-independent way to identify special folders used frequently by
applications, but which may not have the same name or location on any given
system (for default CSIDL_DRIVES).
-
nBIF_Flags (constants
defined in i_misc.ch):
o BIF_EDITBOX(*): Include an edit control in the browse dialog box that allows the user
to type the name of an item.
o BIF_VALIDATE(*): If the user types an invalid name into the edit box, the browse dialog
box calls the application's BrowseCallbackProc with
the BFFM_VALIDATEFAILED message ( ignored if BIF_EDITBOX is not specified)
o BIF_NEWDIALOGSTYLE(*): Use the new user interface. Setting this flag provides the user with a
larger dialog box that can be resized. The dialog box has several new
capabilities, including: drag-and-drop capability within the dialog box,reordering, shortcut menus,
new folders, delete, and other shortcut menu commands.
o BIF_USENEWUI(*): equivalent to BIF_EDITBOX + BIF_NEWDIALOGSTYLE.
(*) set for default.
o BIF_RETURNONLYFSDIRS: Only return file system directories.
o BIF_DONTGOBELOWDOMAIN: Do not include network folders below the domain level in the dialog
box's tree view control.
o BIF_STATUSTEXT: Include a status area in the dialog box ( not supported when
BIF_NEWDIALOGSTYLE )
o BIF_RETURNFSANCESTORS: Only return file system ancestors. An ancestor is a subfolder that is
beneath the root folder in the namespace hierarchy.
o BIF_BROWSEINCLUDEURLS: The browse dialog box can display URLs. The BIF_USENEWUI and
BIF_BROWSEINCLUDEFILES flags must also be set.
o BIF_UAHINT: When combined with BIF_NEWDIALOGSTYLE, adds a usage hint to the dialog
box, in place of the edit box (BIF_EDITBOX overrides this flag)
o BIF_NONEWFOLDERBUTTON: Do not include the New Folder button in the browse dialog box.
o BIF_NOTRANSLATETARGETS: When the selected item is a shortcut, return the PIDL of the shortcut
itself rather than its target.
o BIF_BROWSEFORCOMPUTER: Only return computers
o BIF_BROWSEFORPRINTER: Only allow the selection of printers. In Windows XP and later systems,
the best practice is to use a Windows XP-style dialog, setting the root of the
dialog to the Printers and Faxes folder (CSIDL_PRINTERS).
o BIF_BROWSEINCLUDEFILES: The browse dialog box displays files as well as folders.
o BIF_SHAREABLE: The browse dialog box can display sharable resources on remote systems.
The BIF_NEWDIALOGSTYLE flag must also be set.
o BIF_BROWSEFILEJUNCTIONS: Windows 7 and later. Allow folder junctions such as a library or a
compressed file with a .zip file name extension to be browsed.