Home Forums HTBasic Forum Help with using HTBFileopen.dll, please! Reply To: Help with using HTBFileopen.dll, please!

#7462
Henrikhuse
Participant

    Hi, had the same problem and received the enclosed documentation with some additions and corrections from TransEra. Hope that might help

    HTBfileopen.DLL

    DLL LOAD “HTBfileopen”

    DLL GET “VOID HTBfileopen:Fo”
    DLL GET “VOID HTBfileopen:Sa”

    Fileopen( )

    This function brings a File Open Dialog Box on screen and returns a string with the opened file and pathname. This function takes 6 parameters.

    Parameter 1
    Basic Type: BUFFER
    C Type: void *

    This parameter is a buffer that will contain the returned file name(s). Make sure the buffer is dimensioned large enough to hold all returned file names.

    Parameter 2
    Basic Type: STRING
    C Type: char *

    This parameter is actually the return value, so passed in it must be a HTBasic STRING Dimensioned to be large enough to hold the file name and path.

    Parameter 3
    Basic Type : STRING
    C Type: char *

    This parameter is the default filename extension.

    Parameter 4
    Basic Type : STRING
    C Type: char *

    The initial filename that appears in the filename edit box..

    Parameter 5
    Basic Type : STRING
    C Type: char *

    File extension filters.

    Parameter 6
    Basic Type : LONG
    C Type: long

    A set of bit flags you can use to initialize the dialog box. The value of the parameter is the sum of the values of the styles. The styles associated with the values can be seen below in the styles table.

    Saveas( )

    This function brings a SaveAs Dialog Box on screen and returns a string with the opened file and pathname. This function takes 5 parameters.

    Parameter 1
    Basic Type: STRING
    C Type: char *

    This parameter is actually the return value, so passed in it must be a HTBasic STRING Dimensioned to be large enough to hold the file name and path.

    Parameter 2
    Basic Type : STRING
    C Type: char *

    This parameter is the default filename extension.

    Parameter 3
    Basic Type : STRING
    C Type: char *

    The initial filename that appears in the filename edit box..

    Parameter 4
    Basic Type : STRING
    C Type: char *

    File extension filters.

    Parameter 5
    Basic Type : LONG
    C Type: long

    A set of bit flags you can use to initialize the dialog box. The value of the parameter is the sum of the values of the styles. The styles associated with the values can be seen below in the styles table.

    STYLES:

    Value Attribute
    1 Causes the Read Only check box to be checked initially when the dialog box is created. This flag indicates the state of the Read Only check box when the dialog box is closed.
    2 Causes the Save As dialog box to generate a message box if the selected file already exists. The user must confirm whether to overwrite the file.
    4 Hides the Read Only check box.
    8 Restores the current directory to its original value if the user changed the directory while searching for files.
    16 Causes the dialog box to display the Help button.
    32 Enables the hook function.
    64 Indicates that the Template member points to the name of a dialog template resource in the module identified by the Instance member.
    128 Indicates that the Instance member identifies a data block that contains a preloaded dialog box template. The system ignores the Template Name if this flag is specified.
    256 Specifies that the common dialog boxes allow invalid characters in the returned filename. Typically, the calling application uses a hook procedure that checks the filename by using the FILEOKSTRING message. If the text box in the edit control is empty or contains nothing but spaces, the lists of files and directories are updated.
    512 Specifies that the File Name list box allows multiple selections.
    1024 Specifies that the user typed a filename extension that differs from the extension specified by Parameter 1 in the Fo or Sa function call.
    2048 Specifies that the user can type only valid paths and filenames. If this flag is used and the user types an invalid path and filename in the File Name entry field, the dialog box function displays a warning in a message box.
    4096 Specifies that the user can type only names of existing files in the File Name entry field. If this flag is specified and the user enters an invalid name, the dialog box procedure displays a warning in a message box.
    8192 If the user specifies a file that does not exist, this flag causes the dialog box to prompt the user for permission to create the file. If the user chooses to create the file, the dialog box closes and the function returns the specified name; otherwise, the dialog box remains open.
    16384 Specifies that if a call to the function fails because of a network sharing violation, the error is ignored and the dialog box returns the selected filename.
    32768 Specifies that the returned file does not have the Read Only check box checked and is not in a write-protected directory.
    65536 Specifies that the file is not created before the dialog box is closed. This flag should be specified if the application saves the file on a create-nonmodify network share. When an application specifies this flag, the library does not check for write protection, a full disk, an open drive door, or network protection. Applications using this flag must perform file operations carefully, because a file cannot be reopened once it is closed.
    131072 Hides and disables the Network button.
    262144 For old-style dialog boxes, this flag causes the dialog box to use short filenames.
    524288 Indicates that any customizations made to the Open or Save As dialog box use the new Explorer-style customization methods.
    1048576 Directs the dialog box to return the path and filename of the selected shortcut (.LNK) file. If this value is not given, the dialog box returns the path and filename of the file referenced by the shortcut.
    2097152 For old-style dialog boxes, this flag causes the dialog box to use long filenames.
    8388608 Windows NT 5.0, Windows 98: Enables the Explorer-style dialog box to be resized using either the mouse or the keyboard. By default, the Explorer-style Open and Save As dialog boxes allow the dialog box to be resized regardless of whether this flag is set. This flag is necessary only if you provide a hook procedure or custom template. The old-style dialog box does not permit resizing.

    Scroll to Top
    HTB icon

    Please Sign In