Skip to content

Commit cd33bb1

Browse files
authored
Merge pull request #1760 from msebolt/resource-file-consolidation-pr53
resource file consolidation pr53
2 parents 2832f1f + f66b3a3 commit cd33bb1

4 files changed

Lines changed: 108 additions & 133 deletions

File tree

‎.openpublishing.redirection.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8000,6 +8000,11 @@
80008000
"redirect_url": "/cpp/windows/changing-a-symbol-or-symbol-name-id",
80018001
"redirect_document_id": false
80028002
},
8003+
{
8004+
"source_path": "docs/windows/viewing-and-editing-resources-in-a-resource-editor.md",
8005+
"redirect_url": "/cpp/windows/resource-editors",
8006+
"redirect_document_id": false
8007+
},
80038008
{
80048009
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
80058010
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

‎docs/windows/TOC.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
##### [MFC Predefined Symbols](mfc-predefined-symbols.md)
2222
##### [Win32 Predefined Symbols](win32-predefined-symbols.md)
2323
### [Resource Editors](resource-editors.md)
24-
#### [Viewing and Editing Resources in a Resource Editor](viewing-and-editing-resources-in-a-resource-editor.md)
2524
#### [Accelerator Editor](accelerator-editor.md)
2625
##### [Setting Accelerator Properties](setting-accelerator-properties.md)
2726
##### [Editing Accelerator Tables](editing-accelerator-tables.md)

‎docs/windows/resource-editors.md‎

Lines changed: 103 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
---
22
title: "Resource Editors (C++)"
33
ms.date: "11/04/2016"
4-
f1_keywords: ["vs.editors.resource", "vc.resvw.resource.editors", "vs.resvw.resource.editors"]
5-
helpviewer_keywords: ["editors [C++], resource", "editors [C++]", "resource editors", "Windows [C++], application resource editing"]
4+
f1_keywords: ["vs.editors.resource", "vc.resvw.resource.editors", "vs.resvw.resource.editors", "vs.resourceview", "vc.resvw.resource.previewing", "vs.resvw.resource.previewing"]
5+
helpviewer_keywords: ["editors [C++], resource", "editors [C++]", "resource editors", "Windows [C++], application resource editing", "resources [C++], viewing", "layouts, previewing resource", "resource editors [C++], viewing resources", ".rc files [C++], viewing resources", "resources [C++], editing", "properties [C++], resources", "resources [C++], properties"]
66
ms.assetid: e20a29ec-d6fb-4ead-98f3-431a0e23aaaf
77
---
8-
# Resource Editors
8+
# Resource Editors (C++)
99

10-
A **Resource** editor is a specialized environment for creating or modifying resources that are included in a Visual Studio project. The Visual Studio resource editors share techniques and interfaces to help you create and modify application resources quickly and easily. Resource editors enable you to [view and edit resources in the appropriate editor](../windows/viewing-and-editing-resources-in-a-resource-editor.md) and [preview resources](../windows/previewing-resources.md).
10+
A **Resource** editor is a specialized environment for creating or modifying resources that are included in a Visual Studio project. The Visual Studio resource editors share techniques and interfaces to help you create and modify application resources quickly and easily. Resource editors enable you to view and edit resources in the appropriate editor and preview resources.
1111

1212
The appropriate editor opens automatically when you create or open a resource.
1313

14-
**Note** Because managed projects 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.
14+
> [!NOTE]
15+
> Because managed projects 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
16-
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).
17+
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).
1718

1819
|Use the...|To edit...|
1920
|----------------|----------------|
@@ -27,11 +28,106 @@ For information on adding resources to managed projects, please see [Resources i
2728
|[Toolbar Editor](../windows/toolbar-editor.md)|Toolbar resources in Visual C++ projects. The Toolbar editor is part of the Image editor.|
2829
|[Version Information Editor](../windows/version-information-editor.md)|Version information in Visual C++ projects.|
2930

31+
## View and edit resources in a resource editor
32+
33+
Each resource type has a **Resource** editor specific to that resource type. You can rearrange, resize, add controls and features, or otherwise modify aspects of a resource using the associated editor. You can also edit a resource in [text format](../windows/how-to-open-a-resource-script-file-in-text-format.md) and [binary format](../windows/opening-a-resource-for-binary-editing.md).
34+
35+
Some resource types are individual files that can be imported and used in various ways; these include bitmaps, icons, cursors, toolbars, and html files. Such resources have file names and [resource identifiers](../windows/symbols-resource-identifiers.md). Others, such as dialogs, menus, and string tables in Win32 projects, exist only as part of a resource script (.rc) file or resource template (.rct) file.
36+
37+
Resources can also be edited outside of the project, see [How to: Open a Resource Script File Outside of a Project (Standalone)](../windows/how-to-open-a-resource-script-file-outside-of-a-project-standalone.md).
38+
39+
> [!NOTE]
40+
> Properties of a resource [can be modified using the Properties window](../windows/changing-the-properties-of-a-resource.md).
41+
42+
To edit the properties of a resource:
43+
44+
1. In [Resource View](../windows/resource-view-window.md), right-click the resource you want to edit and choose **Properties** from the shortcut menu.
45+
46+
> [!NOTE]
47+
> If your project doesn't already contain an .rc file, please see [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md).
48+
49+
1. In the [Properties window](/visualstudio/ide/reference/properties-window), change the properties of your resource.
50+
51+
To undo a change made to the properties of a resource:
52+
53+
1. Make sure your resource has focus in **Resource View**.
54+
55+
1. Choose **Undo** from the **Edit** menu.
56+
57+
### Win32 resources
58+
59+
You can access Win32 resources in the [Resource View](../windows/resource-view-window.md) pane.
60+
61+
To view a Win32 resource in a resource editor:
62+
63+
1. Select **Resource View** from the **View** menu.
64+
65+
1. If the **Resource View** window isn't the top-most window, select the **Resource View** tab to bring it to the top.
66+
67+
1. From **Resource View**, expand the folder for the project that contains resources you want to view. For example, if you want to view a dialog resource, expand the **Dialog** folder.
68+
69+
> [!NOTE]
70+
> If your project doesn't already contain an .rc file, please see [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md).
71+
72+
1. Double-click the resource, for example, **IDD_ABOUTBOX**.
73+
74+
The resource opens in the appropriate editor. For example, for dialog resources, the resource opens inside the **Dialog** editor.
75+
76+
You can also [view resources in an .rc (resource script) file without having a project open](../windows/how-to-open-a-resource-script-file-outside-of-a-project-standalone.md).
77+
78+
To delete an existing Win 32 resource:
79+
80+
1. In **Resource View**, expand the node for a resource type.
81+
82+
2. Right-click on the resource you want to delete and choose **Delete** from the shortcut menu.
83+
84+
> [!NOTE]
85+
> You can delete a resource using the same shortcut menu command when you have the .rc file open in a document window outside a project.
86+
87+
### Resources in managed projects
88+
89+
Because managed projects don't 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 don't support editing embedded resources.
90+
91+
To view a managed resource in a resource editor:
92+
93+
In **Solution Explorer**, double-click the resource, for example, *Bitmap1.bmp*.
94+
95+
The resource opens in the appropriate editor.
96+
97+
To delete an existing managed resource:
98+
99+
In **Solution Explorer**, right-click the resource you want to delete and choose **Delete** from the shortcut menu.
100+
101+
## Preview resources
102+
103+
Preview your resources to allow you to view graphical resource without opening them. Previewing is also useful for executables after you've compiled them because the resource identifiers change to numbers. Since these numeric identifiers often don't provide enough information, previewing the resources helps you quickly identify them.
104+
105+
You can preview the visual layout of the following resource types: Bitmap, Dialog, Icon, Menu, Cursor, Toolbar
106+
107+
The visual preview function doesn't apply to resources: Accelerator, Manifest, String Table, and Version Information
108+
109+
> [!NOTE]
110+
> To preview resources requires Win32.
111+
112+
To preview resources:
113+
114+
1. In [Resource View](../windows/resource-view-window.md) or a document window, select your resource, for example, `IDD_ABOUTBOX`.
115+
116+
> [!NOTE]
117+
> If your project doesn't already contain an .rc file, please see [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md).
118+
119+
1. In the [Properties window](/visualstudio/ide/reference/properties-window), select the **Property Pages** button.
120+
121+
> [!TIP]
122+
> For a shortcut, on the **View** menu, select **Property Pages**.
123+
124+
The **Property Page** for the resource opens displaying a preview of that resource. You can then use the **Up** and **Down** arrow keys to navigate the tree control in **Resource View** or the document window. The **Property Page** will stay open and show any resource that has focus and can be previewed.
125+
30126
## Requirements
31127

32128
None
33129

34-
## See Also
130+
## See also
35131

36132
[Working with Resource Files](../windows/working-with-resource-files.md)<br/>
37133
[Resource Files](../windows/resource-files-visual-studio.md)<br/>

‎docs/windows/viewing-and-editing-resources-in-a-resource-editor.md‎

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

0 commit comments

Comments
 (0)