Unit BrowseDr |
Standard defines for all Delphi Free Stuff components } {-----------------------------------------------------------------------------} { TBrowseDirectoryDlg v2.38 } {-----------------------------------------------------------------------------} { A component to encapsulate the Win95 style directory selection dialog } { SHBrowseForFolder(). } { Copyright 1996, Brad Stowers. All Rights Reserved. } { This component can be freely used and distributed in commercial and private } { environments, provied this notice is not modified in any way and there is } { no charge for it other than nomial handling fees. Contact me directly for } { modifications to this agreement. } {-----------------------------------------------------------------------------} { Feel free to contact me if you have any questions, comments or suggestions } { at bstowers@pobox.com. } { The lateset version will always be available on the web at: } { http://www.pobox.com/~bstowers/delphi/ } { See BrowseDr.txt for notes, known issues, and revision history. } {-----------------------------------------------------------------------------} { Date last modified: May 28, 1998 } {-----------------------------------------------------------------------------} {: This unit provides a component that displays a standard Windows 95/NT 4... dialog containing the user's system in a heirarchial manner and allows a... selection to be made. It is a wrapper for the SHBrowseForFolder() API,... which is quite messy to use directly. Also provided is an editor which... allows you to display the dialog at design time with the selected options. Note: This component Requires Delphi 3 or Delphi v2.01's ShlObj unit. If you... have Delphi 2.00, you can get the equivalent using Pat Ritchey's ShellObj... unit. It is freely available on his web site at... http://ourworld.compuserve.com/homepages/PRitchey/. Both Borland's ShlObj... unit and Pat's ShellObj unit contain errors that should be fixed. I have... included instructions on how to do this. They are in the included... ShellFix.txt file. Delphi 3's ShlObj unit does not have any errors that I... am currently aware of. // C++Builder 3 requires this if you use run-time packages.
Classes |
TBrowseDialogEditor - A component editor (not really) to allow on-the-fly testing of the } { dialog.
TBrowseDirectoryDlg - : TBrowseDirectoryDlg provides a component that displays a standard.
Functions |
DirExists - Utility function you may find useful
Register -
Types |
TBDSelChangedEvent
TBrowseFlag
TBrowseFlags
TRootID
Constants |
BIF_BROWSEINCLUDEFILES
CSIDL_APPDATA
CSIDL_COMMON_DESKTOPDIRECTORY
CSIDL_COMMON_PROGRAMS
CSIDL_COMMON_STARTMENU
CSIDL_COMMON_STARTUP
CSIDL_DESKTOPEXPANDED
CSIDL_INTERNET
CSIDL_PRINTHOOD
DFS_COMPONENT_VERSION
Variables |
Functions |
Types |
TBDSelChangedEvent = procedure(Sender: TObject; NewSel: string; NewSelPIDL: PItemIDList) of objectTBDSelChangedEvent is used for events associated with... TBrowseDirectoryDlg's OnSelChanged event. The Sender parameter is the TBrowseDirectoryDlg object whose event handler... is called. The NewSel parameter is the text representation of the new... selection. The NewSelPIDL is the new PItemIDList representation of the... new selection.
TBrowseFlag = ( bfDirectoriesOnly, bfDomainOnly, bfAncestors, bfComputers, bfPrinters, bfIncludeFiles );: These are equivalent to the BIF_* constants in the Win32 API. They are... used to specify what items can be expanded, and what items can be... selected by combining them in a set in the Options property. bfDirectoriesOnly: Only returns file system directories. If the user... selects folders that are not part of the file system, the OK button... is grayed. bfDomainOnly: Does not include network folders below the domain level... in the dialog. bfAncestors: Only returns file system ancestors (items which contain... files, like drives). If the user selects anything other than a file... system ancestor, the OK button is grayed. bfComputers: Shows other computers. If anything other than a computer... is selected, the OK button is disabled. bfPrinters: Shows all printers. If anything other than a printers is... selected, the OK button is disabled. bfIncludeFiles: Show non-folder items that exist in the folders.
TBrowseFlags = set of TBrowseFlag: A set of TBrowseFlag items.
TRootID = ( idDesktop, idInternet, idPrograms, idControlPanel, idPrinters, idPersonal, idFavorites, idStartup, idRecent, idSendTo, idRecycleBin, idStartMenu, idDesktopDirectory, idDrives, idNetwork, idNetHood, idFonts, idTemplates, idCommonStartMenu, idCommonPrograms, idCommonStartup, idCommonDesktopDirectory, idAppData, idPrintHood, idDesktopExpanded );: This enumerated type is the equivalent of the CSIDL_* constants in the... Win32 API. They are used to specify the root of the heirarchy tree. idDesktop: Windows desktop -- virtual folder at the root of the name space. idInternet: Internet Explorer -- virtual folder of the Internet Explorer. idPrograms: File system directory that contains the user's program groups... (which are also file system directories). idControlPanel: Control Panel -- virtual folder containing icons for the... control panel applications. idPrinters: Printers folder -- virtual folder containing installed printers. idPersonal: File system directory that serves as a common respository for... documents. idFavorites: Favorites folder -- virtual folder containing the user's...' Internet Explorer bookmark items and subfolders. idStartup: File system directory that corresponds to the user's Startup... program group. idRecent: File system directory that contains the user's most recently... used documents. idSendTo: File system directory that contains Send To menu items. idRecycleBin: Recycle bin -- file system directory containing file... objects in the user's recycle bin. The location of this directory is... not in the registry; it is marked with the hidden and system... attributes to prevent the user from moving or deleting it. idStartMenu: File system directory containing Start menu items. idDesktopDirectory: File system directory used to physically store file... objects on the desktop (not to be confused with the desktop folder itself). idDrives: My Computer -- virtual folder containing everything on the... local computer: storage devices, printers, and Control Panel. The... folder may also contain mapped network drives. idNetwork: Network Neighborhood -- virtual folder representing the top... level of the network hierarchy. idNetHood: File system directory containing objects that appear in the... network neighborhood. idFonts: Virtual folder containing fonts. idTemplates: File system directory that serves as a common repository for... document templates. idCommonStartMenu: File system directory that contains the programs and... folders that appear on the Start menu for all users on Windows NT. idCommonPrograms: File system directory that contains the directories for... the common program groups that appear on the Start menu for all users... on Windows NT. idCommonStartup: File system directory that contains the programs that... appear in the Startup folder for all users. The system starts these... programs whenever any user logs on to Windows NT. idCommonDesktopDirectory: File system directory that contains files and... folders that appear on the desktop for all users on Windows NT. idAppData: File system directory that contains data common to all... applications. idPrintHood: File system directory containing object that appear in the... printers folder. idDesktopExpanded: Same as idDesktop except that the root item is already... expanded when the dialog is initally displayed. NOTE: idCommonStartMenu, idCommonPrograms, idCommonStartup, and... idCommonDesktopDirectory only have effect when the dialog is being... displayed on an NT system. On Windows 95, these values will be... mapped to thier "non-common" equivalents, i.e. idCommonPrograms will... become idPrograms.
Constants |
Variables |