Copyright: Copyright ® 1992, 1993 Mark Woollard


Index

COMMON FILE DIALOG EXTENSIONS V1.1

The File Dialog Extensions attach a number of buttons to the bottom of a file load or save dialog from the commdlg.dll library supplied with Windows 3.1. Most Windows applications use this library for obtaining file names from the user. Thus when you go to load or save data from within an application the buttons will be available on the file dialog displayed allowing the manipulation of existing files without having to switch to the File Manager. The buttons that appear are configurable, as is the size that file dialogs are displayed. The buttons that may be added to the bottom of the file dialogs are:-

Make Dir
Delete
Rename
File Info
Make Backup

The extensions library also adds two new items to the System Menu of file dialogs. These entries are:-

Options...
Help...
About...


MAKE DIRECTORY BUTTON

Clicking on the Make Dir button will allow a directory to be created in the current directory (as displayed to the top right of the file dialog). You will be asked for the name of the directory, enter this and click OK to create it. If the directory is created successfully the file dialog will update to show the new directory. If an error occurs when trying to create the directory an error message box will be displayed. Click Cancel to exit the Make Directory dialog without attempting to create a directory.


DELETE FILE BUTTON

Clicking on the Delete button will delete the currently selected file. This is the file highlighted in the file dialogs list of files. If no file is selected the Delete button will be disabled and no deletions can take place. If the Confirm Deletes option is enabled you will be asked for confirmation of the deletion, click Yes to delete or No to abort. If Confirm Deletes is not enabled the deletion will take place immediately after you click the Delete button. The file dialog file list will update after the deletion. An error message box will be displayed if the deletion fails.

If the application using the file dialog allows multiple files to be selected all the selected files will be deleted. If the Confirm Deletes option is enabled you will be prompted to confirm deletion for each file in turn. Selecting Cancel on a confirmation dialog will stop the deletion of the currently displayed file and all further selected files.


RENAME FILE BUTTON

The Rename button allows the renaming of the currently selected file. This is the file highlighted in the file dialogs list of files. If no file is selected the Rename button will be disabled and no renaming can take place. Clicking on the Rename with a file selected results in a dialog asking for the new name for the file. This should be entered and OK clicked to rename it. Click Cancel to abort renaming of the file. An error message box will be displayed if renaming of the file fails.

If the application using the file dialog allows multiple files to be selected you will be prompted for a new name for each selected file in turn. Click Yes to rename, No to skip to the next file and Cancel to cancel the renaming of the current and all further selected files


FILE INFORMATION BUTTON

The File Info button will display information about the currently selected file. This is the file highlighted in the file dialogs list of files. If no file is selected the File Info button will be disabled. The information displayed for a file is its name, size, time and date of last modification and its file attributes. This information is not editable. Click on OK when finished viewing the information.

If the application using the file dialog allows multiple files to be selected you will be shown details of each selected file in turn. Click OK to move to the next file and Cancel to stop viewing the selected list of files.


MAKE BACKUP CHECKBOX

The Make Backup checkbox is only enabled when saving. If it is checked before selecting OK to save a file, a backup will be made of any existing file with a name matching that of the file being saved. This is done by copying the existing file to a similarly named file with the extension .bak. An error message box will be displayed if the backup fails.


ABOUT DIALOG

Selecting About... from the System Menu of a file load or save dialog will bring up the file extensions About dialog box. If the copy is registered it will show the registered user and serial number. If it is unregistered it will show *** UNREGISTERED COPY *** and Serial Number : XXXXXX. Clicking OK on an unregistered copy of the extensions will result in the Shareware Reminder dialog being shown, offering the user the chance to register the program. Clicking OK on a registered copy simply returns to the file dialog.


OPTIONS DIALOG

Selecting Options... from the System Menu of a file load or save dialog will bring up the file extensions Options dialog box. This dialog allow the customisation of the extensions and covers three areas. Firstly, the Show checkboxes control which of the possible five extension buttons are added to file dialogs. The next section is the Options checkboxes. Currently this has one checkbox allowing the enabling or disabling of the Confirm Deletes dialog when deleting files. The final set of buttons allow the selecting of the dialog size. This may be Small, Medium or Large. Small is the same as the standard commdlg.dll file dialog, Medium has two columns in the file list box and is slightly deeper and Large is almost full screen on a VGA monitor and gives three columns in the file list box.

Note that the file list on the medium or large settings is a multi-column list and you scroll it horizontally to display any files 'off screen'.

Sometimes you will find the size buttons disabled (shown shaded), this occurs when the library is being used with an application that supplies its own dialog template rather than using the one in commdlg.dll. Because of this the extensions library doesn't know what the dialog will look like and so does not attempt to resize it and also disables disables the size buttons on the Options dialog when called from such a file dialog. The library still attaches the file buttons to the bottom of such a dialog and these can be used as normal.

Click OK to set the selected options and Cancel to ignore the changes.

The options selected in the dialog are saved in a section in the win.ini file and will be used in later windows sessions.


Help
Displays this help file