Compartir a través de


How to: Open a Resource Script File in Text Format

There may be times when you want to view the contents of your project's resource script (.rc) file without opening a resource, such as a dialog box, inside its specific resource editor. For example, you may want to search for a string across all dialog boxes in the resource file without having to open each one separately.

Note

If your project doesn't already contain an .rc file, please see Creating a New Resource Script File.

You can easily open the resource file in text format to view all the resources it contains and perform global operations supported by the Text editor.

Note

The resource editors do not directly read .rc or resource.h files. The resource compiler compiles them into .aps files, which are consumed by the resource editors. This file is a compile step and only stores symbolic data. As with a normal compile process, information that is not symbolic (for example, comments) is discarded during the compile process. Whenever the .aps file gets out of synch with the .rc file, the .rc file is regenerated (for example, when you Save, the resource editor overwrites the .rc file and the resource.h file). Any changes to the resources themselves will remain incorporated in the .rc file, but comments will always be lost once the .rc file is overwritten. For information on how to preserve comments, see Including Resources at Compile Time.

To open a resource script file as text

  1. From the File menu choose Open, then click File.

  2. In the Open File dialog box, navigate to the resource script file you want to view in text format.

  3. Highlight the file, then click the drop-down arrow on the Open button (located on the right side of the button).

  4. Choose Open With from the drop-down menu.

  5. In the Open With dialog box, click Source Code (Text) Editor.

  6. From the Open As drop-down list, select Text.

    The resource opens in the Source Code editor.

- or -

  1. In Solution Explorer, right-click the .rc file.

  2. From the shortcut menu, choose Open with..., then select Source Code (Text) Editor.

For information on adding resources to managed projects, please see Resources in Applications in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resources strings to properties, see Walkthrough: Localizing Windows Forms and Walkthrough: Using Resources for Localization with ASP.NET.

Requirements

Win32

See Also

Reference

Resource Files (Visual Studio)

Resource Editors