DoDialogBrowseForFolder

Prototype

Matrix DoDialogBrowseForFolder( Matrix mPath, String sMessage, String sInitialDir )

Return Value

The return value is 1 on success or 0 on failure. If the user clicks Cancel or closes the dialog box, the return value is 0.

Parameters

Matrix mPath
Upon successful return, this matrix contains the directory path selected by the user.

String sMessage
A message that appears at the top of the dialog box.

String sInitialDir
The initial directory to be displayed by the dialog box. If sInitialDir is a null object, an empty string (""), or the string ".", the dialog box begins in the current directory.

Remarks

This module displays a dialog box that enables the user to select a directory (folder). The module calls the Windows function SHBrowseForFolder to display the dialog box.

Example
run GetInstallationDirectory( InitialDir );
msg = "Select a directory:";
ok = DoDialogBrowseForFolder( path, msg, InitialDir );
if ok then
    print path;
else
    print "Function failed";