|
1 | 1 | ---
|
2 | 2 | title: "How to: Create a Resource Script File (C++)"
|
3 | 3 | ms.date: "11/04/2016"
|
4 |
| -f1_keywords: ["vc.editors.resource"] |
5 |
| -helpviewer_keywords: ["rc files [C++], creating", ".rc files [C++], creating", "resource script files [C++], creating", "resources [C++], viewing", "rc files [C++], viewing resources", ".rc files [C++], viewing resources", "resource script files [C++], viewing resources", "resource script files [C++], opening in text format", ".rc files [C++], opening in text format", "rc files [C++], opening in text format"] |
| 4 | +f1_keywords: ["vc.editors.resource", "vc.resvw.add.MFC"] |
| 5 | +helpviewer_keywords: ["rc files [C++], creating", ".rc files [C++], creating", "resource script files [C++], creating", "resources [C++], viewing", "rc files [C++], viewing resources", ".rc files [C++], viewing resources", "resource script files [C++], viewing resources", "resource script files [C++], opening in text format", ".rc files [C++], opening in text format", "rc files [C++], opening in text format", "rc files [C++], adding MFC support", ".rc files [C++], adding MFC support", "MFC, adding support to resource scripts files", "resource script files [C++], adding MFC support"] |
6 | 6 | ms.assetid: 82be732a-cdcd-4a58-8de7-976d1418f86b
|
7 | 7 | ---
|
8 | 8 | # How to: Create a Resource Script File (C++)
|
9 | 9 |
|
10 | 10 | > [!NOTE]
|
11 | 11 | > The **Resource Editor** is not available in Express editions.
|
12 | 12 | >
|
13 |
| -> This material applies to Windows desktop applications. Projects in .NET languages do not use resource script files. For more information, see [Resource Files](../windows/resource-files-visual-studio.md), for more information. |
| 13 | +> This material applies to Windows desktop applications. Projects in .NET languages do not use resource script files. For more information, see [Resource Files](../windows/resource-files-visual-studio.md). |
14 | 14 |
|
15 | 15 | ## To create a new resource script (.rc) file
|
16 | 16 |
|
@@ -103,11 +103,39 @@ You can easily open the resource file in text format to view all the resources i
|
103 | 103 |
|
104 | 104 | 1. From the shortcut menu, choose **Open with...**, then select **Source Code (Text) Editor**.
|
105 | 105 |
|
| 106 | +## To add MFC Support to resource script files |
| 107 | + |
| 108 | +Normally, when you build an MFC application for Windows using the [MFC Application Wizard](../mfc/reference/mfc-application-wizard.md), 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're editing an .rc file for a Windows application that isn't based on MFC, the following features specific to the MFC framework aren't available: |
| 109 | + |
| 110 | +- MFC code wizards |
| 111 | + |
| 112 | +- Menu prompt strings |
| 113 | + |
| 114 | +- List contents for combo box controls |
| 115 | + |
| 116 | +- ActiveX control hosting |
| 117 | + |
| 118 | +However, you can add MFC support to existing .rc files that don't have it. |
| 119 | + |
| 120 | +> [!NOTE] |
| 121 | +> These steps requires MFC. |
| 122 | +
|
| 123 | +### To add MFC support to .rc files |
| 124 | + |
| 125 | +1. Open the resource script file. |
| 126 | + |
| 127 | +1. In [Resource View](../windows/resource-view-window.md), highlight the resources folder (for example, MFC.rc). |
| 128 | + |
| 129 | +1. In the [Properties window](/visualstudio/ide/reference/properties-window), set the **MFC Mode** property to **True**. |
| 130 | + |
| 131 | + > [!NOTE] |
| 132 | + > 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. |
| 133 | +
|
106 | 134 | ## Requirements
|
107 | 135 |
|
108 | 136 | Win32
|
109 | 137 |
|
110 |
| -## See Also |
| 138 | +## See also |
111 | 139 |
|
112 | 140 | [Resource Files](../windows/resource-files-visual-studio.md)<br/>
|
113 | 141 | [Resource Editors](../windows/resource-editors.md)
|
0 commit comments