The File Name field is a single-line entry (SLE) field used to display the name of a file that was selected from the file list box or entered directly by the user. As the user types, the file or files matching the user entry are scrolled into view in the file list box. The first file name that most closely matches the file name typed by the user is placed at the top of the list box. When the user types a character that causes a mismatch, the file at the top of the list is displayed.
When the user presses the Enter key, the dialog returns the selected file name to the application. The application then initiates the default action of opening the file. When a file name is not valid, such as when the file does not exist, the application displays an error message.
The File Name field displays the currently selected file name or the current string filter. When a filter is specified in the szFullFile field of the FILEDLG data structure, the string filter is displayed without the path information. The string filter remains in the field until a file is selected or the user types over the data in the field.
When a file name is not specified, the File Name field is blank.