
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM
|
DISK I/O
Customize files standard dialog
I've just been working with this routine--here's something to get you started, even though the coding style is a little clunky. BTW, if you don't have Think Reference, it's really helpful for file stuff like this.
' Be sure to have the command window on to run this demo
CLEAR LOCAL
DIM typeList.32,typeList&,fileType&,topLeft.4,dialogID%
LOCAL FN CustomGetFile(sfReply&)
typeList&=@typeList 'address of type list
fileType&=_"APPL" 'file types to include
typeList&;4=@fileType& 'move to start of typeList&
dialogID%=-4000 'standard ID
topLeft.top%=50 : topLeft.left%=50
CALL SFPGETFILE(topLeft,"Select an application:",0,1,typeList&,0,#sfReply&,dialogID%,0) 'this should all be one line
END FN
CLEAR LOCAL
DIM sfReply.74,64 appName$
'the results are returned in an sfReply structure
LOCAL FN TestGetFile
FN CustomGetFile(@sfReply)
LONG IF PEEK(@sfReply)=1
BLOCKMOVE @sfReply+_fName,@appName$,64
PRINT appName$
DO
UNTIL LEN(INKEY$)
END IF
END FN
FN TestGetFile
|