Skip to content

Commit 69f06fc

Browse files
authored
Merge pull request #1756 from msebolt/resource-file-consolidation-pr51
resource file consolidation pr51
2 parents 7d49662 + 0786294 commit 69f06fc

5 files changed

Lines changed: 68 additions & 115 deletions

File tree

‎.openpublishing.redirection.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7970,6 +7970,16 @@
79707970
"redirect_url": "/cpp/windows/how-to-include-resources-at-compile-time",
79717971
"redirect_document_id": false
79727972
},
7973+
{
7974+
"source_path": "docs/windows/editable-file-types-for-resources.md",
7975+
"redirect_url": "/cpp/windows/resource-files-visual-studio",
7976+
"redirect_document_id": false
7977+
},
7978+
{
7979+
"source_path": "docs/windows/manifest-resources.md",
7980+
"redirect_url": "/cpp/windows/resource-files-visual-studio",
7981+
"redirect_document_id": false
7982+
},
79737983
{
79747984
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
79757985
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

‎docs/windows/TOC.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#### [How to: Create Resources](how-to-create-a-resource-script-file.md)
1414
#### [How to: Manage Resources](how-to-copy-resources.md)
1515
#### [How to: Include Resources at Compile Time](how-to-include-resources-at-compile-time.md)
16-
#### [Editable File Types for Resources](editable-file-types-for-resources.md)
17-
#### [Manifest Resources](manifest-resources.md)
1816
### [Symbols: Resource Identifiers](symbols-resource-identifiers.md)
1917
#### [Viewing Resource Symbols](viewing-resource-symbols.md)
2018
#### [Creating New Symbols](creating-new-symbols.md)

‎docs/windows/editable-file-types-for-resources.md‎

Lines changed: 0 additions & 38 deletions
This file was deleted.

‎docs/windows/manifest-resources.md‎

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
22
title: "Resource Files (C++)"
33
ms.date: "11/04/2016"
4-
helpviewer_keywords: ["resources [C++]", ".rc files [C++]", "resource files [C++]", "resource script files [C++]", "resource script files [C++], Win-32 based applications", "resource script files [C++], files updated when editing resources", "resources [C++], types of resource files", "rct files [C++]", "rc files [C++]", "resource files [C++], types of", ".rct files [C++]", "resource script files [C++], unsupported types"]
4+
f1_keywords: ["vc.editors.resource"]
5+
helpviewer_keywords: ["resources [C++]", ".rc files [C++]", "resource files [C++]", "resource script files [C++]", "resource script files [C++], Win-32 based applications", "resource script files [C++], files updated when editing resources", "resources [C++], types of resource files", "rct files [C++]", "rc files [C++]", "resource files [C++], types of", ".rct files [C++]", "resource script files [C++], unsupported types", "manifest resources [C++]", "resources [C++], manifest", "resources [C++], opening", "file types [C++], for resources", "resources [C++], editing", "files [C++], editable types", "resource editing"]
56
ms.assetid: 4d2b6fcc-07cf-4289-be87-83a60f69533c
67
---
78
# Resource Files (C++)
89

910
> [!NOTE]
1011
> This material applies to Windows desktop applications. For information about resources in Universal Windows Platform apps, see [Defining App Resources](/windows/uwp/app-resources/).
1112
>
12-
> For information on adding resources to managed projects, please see [Resources in Desktop Apps](/dotnet/framework/resources/index) in the *.NET Framework Developer's Guide*. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see [Creating Resource Files for Desktop Apps](/dotnet/framework/resources/creating-resource-files-for-desktop-apps). For information on globalization and localization of resources in managed apps, see [Globalizing and Localizing .NET Framework Applications](/dotnet/standard/globalization-localization/index).
13+
> For information on adding resources to managed projects, see [Resources in Desktop Apps](/dotnet/framework/resources/index) in the *.NET Framework Developer's Guide*. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see [Creating Resource Files for Desktop Apps](/dotnet/framework/resources/creating-resource-files-for-desktop-apps). For information on globalization and localization of resources in managed apps, see [Globalizing and Localizing .NET Framework Applications](/dotnet/standard/globalization-localization/index).
1314
>
1415
> Since projects in .NET programming languages do not use resource script files, you must open your resources from **Solution Explorer**. You can use the [Image editor](../windows/image-editor-for-icons.md) and the [Binary editor](binary-editor.md) to work with resource files in managed projects. Any managed resources you want to edit must be linked resources. The Visual Studio resource editors do not support editing embedded resources.
1516
@@ -23,7 +24,7 @@ The term "resource file" can refer to a number of file types, including:
2324

2425
- A header file generated by the development environment, for example Resource.h, that is referred to from an .rc file.
2526

26-
Resources can also be found in [other file types](../windows/editable-file-types-for-resources.md) such as .exe, .dll, and .res files. You can work with resources and resource files from within your project and with those that are not part of your current project. You can also work with resource files that were not created in the development environment of Visual Studio. For example, you can:
27+
Resources are also found in [other file types](../windows/editable-file-types-for-resources.md) such as .exe, .dll, and .res files. You can work with resources and resource files from within your project and the ones that aren't part of your current project. You can also work with resource files that weren't created in the development environment of Visual Studio. For example, you can:
2728

2829
- Work with nested and conditionally included resource files.
2930

@@ -33,38 +34,78 @@ Resources can also be found in [other file types](../windows/editable-file-types
3334

3435
- Include shared or read-only identifiers (symbols) that can't be modified by the development environment.
3536

36-
- Include resources in your executable (.exe) file that don't require editing (or that you don't want to be edited) during your current project, such as resources that are shared between several projects.
37+
- Include resources in your executable (.exe) file that don't require editing (or that shouldn't be edited) during your current project, such as shared resources between several projects.
3738

3839
- Include resource types not supported by the development environment.
3940

40-
This section covers:
41+
You can open the following types of files and edit the resources they contain:
4142

42-
- [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md)
43+
|File name|Description|
44+
|---------------|-----------------|
45+
|.rc|Resource script files.|
46+
|.rct|Resource template files.|
47+
|.res|Resource files.|
48+
|.resx|Managed resource files.|
49+
|.exe|Executable files.|
50+
|.dll|Dynamic-link library files.|
51+
|.bmp, .ico, .dib, and .cur|Bitmap, icon, toolbar and cursor files.|
4352

44-
- [Creating a New Resource](../windows/how-to-create-a-resource.md)
53+
The Visual Studio environment works with and affects the files shown in the following table during your resource editing session:
4554

46-
- [Viewing Resources in a Resource Script File](../windows/how-to-open-a-resource-script-file-outside-of-a-project-standalone.md)
55+
|File name|Description|
56+
|---------------|-----------------|
57+
|Resource.h|Header file generated by the development environment; contains symbol definitions. (Include this file in source control.)|
58+
|Filename.aps|Binary version of the current resource script file; used for quick loading.<br /><br /> The resource editors don't 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 isn't 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](../windows/how-to-include-resources-at-compile-time.md). (Typically, you shouldn't include the .aps file in source control.)|
59+
|.rc|Resource script file that contains script for the resources in your current project. This file is overwritten by the .aps file whenever you save. (Include this file in source control.)|
4760

48-
- [Opening a Resource Script File in Text Format](../windows/how-to-open-a-resource-script-file-in-text-format.md)
61+
This section covers how to:
4962

50-
- [Including Resources at Compile Time](../windows/how-to-include-resources-at-compile-time.md)
63+
- [Create Resources](../windows/how-to-create-a-resource-script-file.md)
5164

52-
- [Copying Resources](../windows/how-to-copy-resources.md)
65+
- [Manage Resources](../windows/how-to-copy-resources.md)
5366

54-
- [Using Resource Templates (.rct)](../windows/how-to-use-resource-templates.md)
67+
- [Include Resources at Compile Time](../windows/how-to-include-resources-at-compile-time.md)
5568

56-
- [Importing and Exporting Resources](../windows/how-to-import-and-export-resources.md)
69+
## Manifest resources
5770

58-
- [Editable File Types for Resources](../windows/editable-file-types-for-resources.md)
71+
In C++ desktop projects, manifest resources are XML files that describe the dependencies that an application uses. For example, in Visual Studio, the MFC wizard-generated manifest file defines which of the Windows common control DLLs the application should use, version 5.0 or 6.0:
5972

60-
- [Files Affected by Resource Editing](../windows/files-affected-by-resource-editing.md)
73+
```xml
74+
<description>Your app description here</description>
75+
<dependency>
76+
<dependentAssembly>
77+
<assemblyIdentity
78+
type="win32"
79+
name="Microsoft.Windows.Common-Controls"
80+
version="6.0.0.0"
81+
processorArchitecture="X86"
82+
publicKeyToken="6595b64144ccf1df"
83+
language="*"
84+
/>
85+
</dependentAssembly>
86+
</dependency>
87+
```
88+
89+
For a Windows XP or Windows Vista application, the manifest resource not only specifies that the application use the most current version of the Windows common controls, v6.0, as seen above, but it also supports the [Syslink control](/windows/desktop/Controls/syslink-overview).
90+
91+
To view the version and type information contained in a manifest resource, you can open the file in an XML viewer or in the Visual Studio text editor. If you open a manifest resource from [Resource View](../windows/resource-view-window.md), the resource will open in binary format. To view the contents of a manifest resource in a more viewable format, you must open the resource from **Solution Explorer**.
92+
93+
To open a manifest resource, choose from the following steps:
94+
95+
- For text editor, with your project open in **Solution Explorer**, expand the **Resource Files** folder and double-click the .manifest file.
96+
97+
- For another editor, in **Solution Explorer**, right-click the .manifest file and choose **Open With...** from the shortcut menu. In the **Open With** dialog box, specify the editor you would like to use and select **Open**.
98+
99+
> [!NOTE]
100+
> You can only have one manifest resource per module.
61101
62102
## Requirements
63103

64104
Win32
65105

66-
## See Also
106+
## See also
67107

68108
[Resource Editors](../windows/resource-editors.md)<br/>
69109
[Working with Resource Files](../windows/working-with-resource-files.md)<br/>
70-
[Menus and Other Resources](https://msdn.microsoft.com/library/windows/desktop/ms632583.aspx)
110+
[Menus and Other Resources](https://msdn.microsoft.com/library/windows/desktop/ms632583.aspx)<br/>
111+
[Controls](../mfc/controls-mfc.md)<br/>

0 commit comments

Comments
 (0)