DLLGetOpenFileName()

DLLGetOpenFileName()
  • SYNOPSIS:
    filename$ = DLLGetOpenFileName$(sTitle$,sInitialDir$,sFilter$,[iFlags],[iOutBufferSize])
  • DESCRIPTION:
    Pops up an explorer style common control dialog box. From this window the user can select a drive, path and file to open. Something that is EXTREMELY usful in Blitz that we have not had access to up until now... Well here it is. Have fun!
  • PARAMETERS:
    sTitle$ The title you want to give the dialog box, something like "Please Select A Text File" is customary.
    sInitialDir$ The initial directory you want the dialog box to start in.
    sFilter$

    A filter you want to show in the pattern matching box. This has to be specifically set up, but you can pass nothing ("") if you like. The format for filters is:

    <Text> + Chr(0) + <Pattern_Match> + Chr(0)

    EG:

    sFilter$ = "All Files (*.*)" + Chr(0) + "*.*" + Chr(0)      ; Matches all files.

    And NULL terminated. See example006.bb for information on setting up filters.

    iFlags (optional)

    OFN_ALLOWMULTISELECT - Allows you to multiselect files (not implemented in BlitzSys properly YET!)
    OFN_CREATEPROMPT - Prompts the user as to whether they want to create a file that doesnt exist.
    OFN_FILEMUSTEXIST - File must exist for it to be returned.
    OFN_HIDEREADONLY - Hides the read only button in the dialog...
    OFN_NOCHANGEDIR - Stops the user from changing the initial directory.
    OFN_NONETWORKBUTTON - Hides and disables the network button.
    OFN_NOREADONLYRETURN - Stops the requester returning readonly files..
    OFN_NOVALIDATE - If selected, no check will be done for invalid characters.
    OFN_OVERWRITEPROMPT - Prompt for overwrite file...
    OFN_PATHMUSTEXIST - Specifies that the path MUST exist for it to be able to be selected.
    OFN_READONLY - Makes the read only checkbox in the dialog box to be checked immediately.

    iOutBufferSize (optional) The size of the buffer the resulting filename should be passed in. Defaults to 512.
  • RETURNS:
    The filename$ of the selected file, or "" if the cancel button was clicked.
  • EXAMPLE:
    See example006.bb
  • BUGS:
    None Known.
  • SEE ALSO:
    DLLGetSaveFileName()

Return To Index
Problems with this command or bugs? EMail me at: mailto:loki.sd@blueyonder.co.uk

Section Last Updated: Saturday, February 2, 2002 3:17 PM GMT

All materials used in this help, related sources and binaries are (C)opyright Rob Hutchinson, Joseph Cox and Tarropithium Software 2002. All rights reserved. All software is provided without warranty unless otherwise stated.
Tarropithium Software or the authors will not be held liable for any damage or data loss that may occur during the application of this software. Use it at your own risk!