You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d0fe8ba
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -20,15 +20,92 @@ To open the **Binary Editor**, first choose **File** > **New** > **File** from t
20
20
> [!TIP]
21
21
> While using the **Binary** editor, in many instances, you can right-click to display a shortcut menu of resource-specific commands. The commands available depend on what your cursor is pointing to. For example, if you click while pointing to the **Binary** editor with selected hexadecimal values, the shortcut menu shows the **Cut**, **Copy**, and **Paste** commands.
22
22
23
-
With the **Binary** editor, you can:
23
+
## Binary Editor How-To
24
24
25
-
-[Open a resource for binary editing](../windows/opening-a-resource-for-binary-editing.md)
25
+
With the **Binary** editor, see the following actions:
-[Create a new custom or data resource](../windows/creating-a-new-custom-or-data-resource.md)
31
+
1. In [Resource View](../windows/resource-view-window.md), select the specific resource file you want to edit.
32
+
33
+
> [!NOTE]
34
+
> 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).
35
+
36
+
1. Right-click the resource and click **Open Binary Data** from the shortcut menu.
37
+
38
+
> [!NOTE]
39
+
> If you use the [Resource View](../windows/resource-view-window.md) window to open a resource with a format that Visual Studio does not recognize (such as RCDATA or a custom resource), the resource is automatically opened in the **Binary** editor.
40
+
41
+
#### To open a managed resource
42
+
43
+
1. In **Solution Explorer**, select the specific resource file you want to edit.
44
+
45
+
1. Right-click the resource and choose **Open With** from the shortcut menu.
46
+
47
+
1. In the **Open With** dialog box, choose **Binary Editor**.
48
+
49
+
> [!NOTE]
50
+
> 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.
Binary Data for a Dialog Box Displayed in the Binary Editor
54
+
55
+
Only certain ASCII values are represented in the Binary editor (0x20 through 0x7E). Extended characters are displayed as periods in the ASCII Value section of the Binary editor (the right panel). The "printable" characters are ASCII values 32 through 126.
56
+
57
+
> [!NOTE]
58
+
> If you want to use the **Binary** editor on a resource already being edited in another editor window, close the other editor window first.
59
+
60
+
### To edit a resource in the Binary editor
61
+
62
+
1. Select the byte you want to edit.
63
+
64
+
The **Tab** key moves the focus between the hexadecimal and ASCII sections of the **Binary** editor. You can use the **Page Up** and **Page Down** keys to move through the resource one screen at a time.
65
+
66
+
1. Type the new value.
67
+
68
+
The value changes immediately in both the hexadecimal and ASCII sections and focus shifts to the next value in line.
69
+
70
+
> [!NOTE]
71
+
> The **Binary** editor accepts changes automatically when you close the editor.
72
+
73
+
### To find binary data
74
+
75
+
You can search for either ASCII strings or hexadecimal bytes. For example, to find "Hello," you can search for either the string "Hello" or for "48 65 6C 6C 6F" (the hexadecimal equivalent).
76
+
77
+
1. From the **Edit** menu, choose [Find](/visualstudio/ide/reference/find-command).
78
+
79
+
1. In the **Find What** box, select a previous search string from the drop-down list or type the data you want to find.
80
+
81
+
1. Select any of the **Find** options.
82
+
83
+
1. Select **Find Next**.
84
+
85
+
### To create a new custom or data resource
86
+
87
+
You can create a new custom or data resource by placing the resource in a separate file using normal resource script (.rc) file syntax, and then including that file by right-clicking your project in **Solution Explorer** and clicking **Resource Includes** on the shortcut menu.
88
+
89
+
1.[Create a .rc file](../windows/how-to-create-a-resource-script-file.md) that contains the custom or data resource.
90
+
91
+
You can type custom data in a .rc file as null-terminated quoted strings, or as integers in decimal, hexadecimal, or octal format.
92
+
93
+
1. In **Solution Explorer**, right-click your project's .rc file, then click **Resource Includes** on the shortcut menu.
94
+
95
+
1. In the **Compile-Time Directives** box, type a `#include` statement that gives the name of the file containing your custom resource. For example:
96
+
97
+
```cpp
98
+
#include mydata.rc
99
+
```
100
+
101
+
Make sure the syntax and spelling of what you type are correct. The contents of the **Compile-Time Directives** box are inserted into the resource script file exactly as you typed them.
102
+
103
+
1. Select **OK** to record your changes.
104
+
105
+
Another way to create a custom resource is to import an external file as the custom resource. For more information, see [Importing and Exporting Resources](../windows/how-to-import-and-export-resources.md).
106
+
107
+
> [!NOTE]
108
+
> Creating new custom or data resources requires Win32.
0 commit comments