here is an all code bff replacement with test harness.
features
written with
updates
discussion thread
------------------
every day i try to learn one thing new,
but new things to learn are increasing exponentially.
at this rate i’m becoming an idiot faster and faster !!!
------------------
george w. bleck
lead computer systems engineer
keyspan corporation
[this message has been edited by george bleck (edited april 02, 2003).]
features
- can browse for directories only or directories and files
- uses proper icons in the treeview display
- dyamically builds the directory hierarchy on-the-fly to save time and memory
- worker thread fills node in the background so you can still interact while it's loading large directories
- removes collapsed nodes from the treeview to save memory
- allows masking based on file and directory attributes (read only, hidden, system)
- allows cut-and-paste of the path without actually saying "ok"
- fully customizable title and message
- fully customizable drive type selections
- fully customizable multiple file match mask (using pipe delimiter)
- fully customizable everything as you can change the code
written with
- pbwin 7.0
- pbforms 1.0 (metatags removed)
- winapi32.inc date: 2003-02-19
- compiles in pbdll 6.11 no problem
updates
- 2003-03-17 : (01) corrected glitch that prevented icons from showing on win9x pc's.
- 2003-03-17 : (02) modified icons section to be more platform/drive generic (by: borje hagsten)
- 2003-03-19 : (03) plus sign now disappears when an empty directory is selected for expansion (by: david kenny) (removed! see 10)
- 2003-03-29 : (04) threaded background fill of node with "loading" indicator
- 2003-03-29 : (05) expanding a node while another is in progress cancels/collapses the in progress expand
- 2003-03-29 : (06) fixed a handle leak
- 2003-03-29 : (07) fixed selection of the "loading..." message to return nothing
- 2003-03-29 : (08) moved some globals around and changed the name of the global udt
- 2003-03-30 : (09) added pipe seperated search criteria
- 2003-03-30 : (10) added intelligent folder loading (concept by: borje hagsten)
- 2003-03-30 : (11) replaced terminatethread with safer code
- 2003-04-01 : (12) fixed win9x bug with expansion (+/-) symbol not showing
- 2003-04-01 : (13) add the ability to specify exactly what drive letters to allow to show
- 2003-04-01 : (14) add the ability to pre-open a specified path
- 2003-04-02 : (15) fixed some major bugs for file/dirs with no special attributes applied not showing up
discussion thread
Code:
'this is the test harness '----------------------------------------------------------------------------(') #compile exe #register none #include "win32api.inc" #include "commctrl.inc" #include "libbff.inc" '----------------------------------------------------------------------------(') function pbmain( ) 'must fill in these settings before calling the bff...see constant declarations for options libbff_gstructsettings.dwddirattributemask = %file_attribute_readonly or %file_attribute_hidden or %file_attribute_system or %file_attribute_normal or %file_attribute_archive 'uses the win32_find_data constants libbff_gstructsettings.dwddrivetypes = %libbff_drivetype_fixed 'which drives types to accept libbff_gstructsettings.dwdfileattributemask = %file_attribute_readonly or %file_attribute_hidden or %file_attribute_system or %file_attribute_normal or %file_attribute_archive 'uses standard win32_find_data constants libbff_gstructsettings.dwdshowtype = %libbff_showtype_dirsandfiles libbff_gstructsettings.strdrivestring = chr$( 67 to 90 ) 'optionally supply the drives letters you wish to allow, leave blank to allow all libbff_gstructsettings.strfilematchmask = "*|*.bas" 'can be a pipe delimted list of masks libbff_gstructsettings.strbffpath = "c:\program files\common files\microsoft shared" 'you can prefill the strbffpath to open that start on that path msgbox "bff returned: " & chr$( 13, 13, 34 ) _ & libbff_dlgmain( %hwnd_desktop, _ "bff replacement title", _ "please select the file or directory you wish to use and click accept," & $cr & "click on the close button to exit without selecting anything" ) & _ $dq end function
every day i try to learn one thing new,
but new things to learn are increasing exponentially.
at this rate i’m becoming an idiot faster and faster !!!
------------------
george w. bleck
lead computer systems engineer
keyspan corporation
[this message has been edited by george bleck (edited april 02, 2003).]
Comment