This documentation is archived and is not being maintained.

How to: Add MFC Support to Resource Script Files

Normally, when you build an MFC application for Windows using the MFC Application Wizard, the wizard generates a basic set of files (including a resource script (.rc) file) that contains the core features of the Microsoft Foundation classes (MFC). However, if you are editing an .rc file for a Windows application that is not based on MFC, the following features specific to the MFC framework are not available:

  • MFC code wizards (previously called "MFC ClassWizard")

  • Menu prompt strings

  • List contents for combo box controls

  • ActiveX control hosting

However, you can add MFC support to existing .rc files that do not have it.

To add MFC support to .rc files

  1. Open the resource script file.

    Note Note

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

  2. In Resource View, highlight the resources folder (for example, MFC.rc).

  3. In the Properties window, set the MFC Mode property to True.

    Note Note

    In addition to setting this flag, the .rc file must be part of an MFC project. For example, just setting MFC Mode to True on an .rc file in a Win32 project won't give you any of the MFC features.

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.