CNiBinding::SelectURL

CNi

Class
CNiBinding::
SelectURL()
Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: operator =Next page: SetBindObject    
Public Function Declared in:
NiBinding.h

'Declaration' icon -- Shortcut to top of page. Declaration

bool SelectURL(
    const CString& startURL = "",
    const CString& title = "",
    int options = 0,
    const CString& filter = "");

'Description' icon -- Shortcut to top of page. Description

Displays a dialog box for the user to select a data source/target and sets the URL property to that data item.

Shortcut to top of page. Parameters

const CString& startURL = ""

A string containing the URL target to open the dialog box. The type of data source specified in this string determines the format of the dialog box. Pass an empty string ("") to prompt the user with a simple text box. Pass a URL scheme, such as "file:", to open a dialog box appropriate for browsing for that type of URL. Pass an entire URL, such as "opc://alewife/National Instruments.OPCTest/Modbus Demo Box\4:0" to open a dialog box appropriate for browsing that type of URL.

const CString& title = ""

The dialog box title.

int options = 0

Options that control the behavior of the dialog. Pass a combination of the flags shown below.

  • CNiBinding::CreatePrompt - opens a dialog box to prompt the user for permission to create the file if that file does not already exist. 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.
  • CNiBinding::FileMustExist - specifies that the user can type only names of existing files in the File Name field. If this flag is specified and the user enters an invalid name, the dialog box procedure displays a warning in a message box.
  • CNiBinding::HideReadonly - hides the Read Only check box.
  • CNiBinding::NoChangeDir - restores the current directory to its original value if the user changed the directory while searching for files.
  • CNiBinding::NoDereferenceLinks - 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
  • CNiBinding::NoReadonlyReturn - specifies that the returned file does not have the Read Only check box checked and is not in a write-protected directory.
  • CNiBinding::NoTestFileCreate - 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 CNiDataSocket object does not check for write protection, a full disk, an open drive door, or network protection. Applications that use this flag must perform file operations carefully, because a file cannot be reopened once it is closed.
  • CNiBinding::OverWritePrompt - causes the Save As dialog box to generate a message box if the selected file already exists. The user must confirm overwriting the file.
  • CNiBinding::PathMustExist - 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 field, the dialog box function displays a warning in a message box.
  • CNiBinding::ReadOnly - causes the Read Only check box to be checked initially when the dialog box is created.
  • CNiBinding::SaveAs - causes the file dialog box to be a Save As file dialog box rather than an Open file dialog box.
const CString& filter = ""

A filter string to pass to the dialog box. For example,

All Files (*.*)|*.*

'See Also' icon -- Shortcut to top of page. See Also