Skip to content

Commit 71fc3e4

Browse files
authored
Merge pull request #1714 from msebolt/resource-file-consolidation-pr27
resource file consolidation pr27
2 parents d1ef06b + ffbe7c7 commit 71fc3e4

File tree

5 files changed

+77
-95
lines changed

5 files changed

+77
-95
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7650,6 +7650,16 @@
76507650
"redirect_url": "/cpp/windows/version-information-editor",
76517651
"redirect_document_id": false
76527652
},
7653+
{
7654+
"source_path": "docs/windows/changing-the-properties-of-a-resource.md",
7655+
"redirect_url": "/cpp/windows/viewing-and-editing-resources-in-a-resource-editor",
7656+
"redirect_document_id": false
7657+
},
7658+
{
7659+
"source_path": "docs/windows/previewing-resources.md",
7660+
"redirect_url": "/cpp/windows/viewing-and-editing-resources-in-a-resource-editor",
7661+
"redirect_document_id": false
7662+
},
76537663
{
76547664
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
76557665
"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
@@ -52,8 +52,6 @@
5252
##### [Win32 Predefined Symbols](win32-predefined-symbols.md)
5353
### [Resource Editors](resource-editors.md)
5454
#### [Viewing and Editing Resources in a Resource Editor](viewing-and-editing-resources-in-a-resource-editor.md)
55-
##### [Changing the Properties of a Resource](changing-the-properties-of-a-resource.md)
56-
#### [Previewing Resources](previewing-resources.md)
5755
#### [Accelerator Editor](accelerator-editor.md)
5856
##### [Setting Accelerator Properties](setting-accelerator-properties.md)
5957
##### [Editing Accelerator Tables](editing-accelerator-tables.md)

docs/windows/changing-the-properties-of-a-resource.md

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

docs/windows/previewing-resources.md

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

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

Lines changed: 67 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: "Viewing and Editing Resources in a Resource Editor (C++)"
33
ms.date: "11/04/2016"
4-
f1_keywords: ["vs.resourceview"]
5-
helpviewer_keywords: ["resources [C++], viewing", "layouts, previewing resource", "resource editors [C++], viewing resources", ".rc files [C++], viewing resources", "resources [C++], editing"]
4+
f1_keywords: ["vs.resourceview", "vc.resvw.resource.previewing", "vs.resvw.resource.previewing"]
5+
helpviewer_keywords: ["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: ba8bdc07-3f60-43c7-aa5c-d5dd11f0966e
77
---
88
# Viewing and Editing Resources in a Resource Editor (C++)
99

1010
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).
1111

12-
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 as well as [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.
12+
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.
1313

1414
> [!NOTE]
1515
> Properties of a resource [can be modified using the Properties window](../windows/changing-the-properties-of-a-resource.md).
@@ -22,14 +22,14 @@ You can access Win32 resources in the [Resource View](../windows/resource-view-w
2222

2323
1. Select **Resource View** from the **View** menu.
2424

25-
2. If the **Resource View** window is not the top-most window, click the **Resource View** tab to bring it to the top.
25+
1. If the **Resource View** window isn't the top-most window, select the **Resource View** tab to bring it to the top.
2626

27-
3. 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.
27+
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.
2828

2929
> [!NOTE]
3030
> 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).
3131
32-
4. Double-click the resource, for example, **IDD_ABOUTBOX**.
32+
1. Double-click the resource, for example, **IDD_ABOUTBOX**.
3333

3434
The resource opens in the appropriate editor. For example, for dialog resources, the resource opens inside the **Dialog** editor.
3535

@@ -46,24 +46,80 @@ You can access Win32 resources in the [Resource View](../windows/resource-view-w
4646
4747
## Resources in Managed Projects
4848

49-
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.
49+
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.
5050

51-
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).
51+
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).
5252

5353
### To view a managed resource in a resource editor
5454

55-
1. In **Solution Explorer**, double-click the resource, for example, **Bitmap1.bmp**.
55+
In **Solution Explorer**, double-click the resource, for example, **Bitmap1.bmp**.
5656

5757
The resource opens in the appropriate editor.
5858

5959
### To delete an existing managed resource
6060

61-
1. In **Solution Explorer**, right-click the resource you want to delete and choose **Delete** from the shortcut menu.
61+
In **Solution Explorer**, right-click the resource you want to delete and choose **Delete** from the shortcut menu.
62+
63+
## Changing the Properties of Resources
64+
65+
### To edit the properties of a resource
66+
67+
1. In [Resource View](../windows/resource-view-window.md), right-click the resource you want to edit and choose **Properties** from the shortcut menu.
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. In the [Properties window](/visualstudio/ide/reference/properties-window), change the properties of your resource.
73+
74+
### To undo a change made to the properties of a resource
75+
76+
1. Make sure your resource has focus in **Resource View**.
77+
78+
1. Choose **Undo** from the **Edit** menu.
79+
80+
## Previewing Resources
81+
82+
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.
83+
84+
You can preview the visual layout of the following resource types:
85+
86+
- Bitmap
87+
88+
- Dialog
89+
90+
- Icon
91+
92+
- Menu
93+
94+
- Cursor
95+
96+
- Toolbar
97+
98+
The visual preview function doesn't apply to Accelerator, Manifest, String Table, and Version Information resources.
99+
100+
### To preview resources
101+
102+
1. In [Resource View](../windows/resource-view-window.md) or a document window, select your resource, for example, **IDD_ABOUTBOX**.
103+
104+
> [!NOTE]
105+
> 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).
106+
107+
1. In the [Properties window](/visualstudio/ide/reference/properties-window), select the **Property Pages** button.
108+
109+
\- or -
110+
111+
On the **View** menu, select **Property Pages**.
112+
113+
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.
114+
115+
> [!NOTE]
116+
> To preview resources requires Win32.
62117
63118
## Requirements
64119

65120
None
66121

67-
## See Also
122+
## See also
68123

124+
[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)<br/>
69125
[Resource Editors](../windows/resource-editors.md)

0 commit comments

Comments
 (0)