Share via


Opening a File

Home Page (Text Editor)OverviewHow Do I ... TopicsFAQReference

When you open a source file, its name is added to the Window menu. You cannot use the Open command on the File menu to open another copy of an open source file.

To open a file

  1. From the File menu, choose Open.

  2. Select the drive and directory where the file is stored.

  3. If you want read only, select the Open as read only check box.

    Note   You can edit a file even if the Open as read only check box is selected. When you save the file, the Save As dialog box appears, allowing you to save the file using a different name.

  4. Specify the types of files to display in the Files of type box.

    Files with the chosen extension are displayed in the list box. For example, Project Workspaces displays all files with the .dsw extension. The Files of type box initially lists commonly used file extensions. The default shows the .c, .cpp, .cxx, .h, and .rc extensions.

    Tip   You can specify wildcard patterns in the File name box to display file types. You can use any combination of wildcard patterns, delimited by semicolons. For example, if you type *.h;*.cpp, all files with these extensions are displayed. The wildcard patterns you specify are retained until you close the dialog box.

  5. Select a filename, then click Open.

You can also open a file by double-clicking the file icon in the Project Workspace, or by dragging the icon of a non-project file into the application window.

Tip   The names of the four most recently opened files are displayed at the end of the File menu. To open one of these files, choose its name from the menu.