You may encounter resource ID collisions when you try to rename duplicated resources by using Visual C++ (141345)
The information in this article applies to:
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 2.2
- Microsoft Visual C++ 4.0
- Microsoft Visual C++ 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ 2005 Express Edition
This article was previously published under Q141345 SYMPTOMS If you duplicate a resource a few times in the resource
browser by using copy and paste, you will find that it is possible to run into
resource ID collisions when you try to rename the resources using the resource
property dialog box. That is, when you try to rename your resources, you will
find that the resource editor may try to assign your new resource name an
integer ID that already exists. This will cause a resource editor error
message. CAUSE This problem is the result of the Resource Editor not
correctly assigning new IDs to resource names when you try to give a resource a
new name. The Resource Editor actually is trying to assign the new resource
name an integer ID that is already used by another resource. This will cause
the resource ID collision. RESOLUTION After you have duplicated your resources and before you
start to rename them, take the following steps to ensure that your resource
names have unique integer identifiers:
- If you are using Visual C++, versions 2.x, make sure that the
resource file is open by double-clicking the .rc file in the project window. In
Visual C++ versions 4.x, click the Resource tab in the Project window. In Visual C++ versions 5.0 and 6.0,
click the ResourceView tab in the Project Workspace pane.
- If you are using Visual C++ 2.x, open the Symbols dialog box. To do this,click Symbols on the Resource menu. In Visual C++ versions 4.0, 4.1, 4.2, 5.0, and 6.0, click Resource Symbols on the View menu.
- Click New. The New Symbol dialog box appears.
- In the name edit control, type the new symbol name that you want
to use.
- In the Value edit control, type the new symbol value that you
want to use. You must make sure that this value is not being used by any of the
resources that are listed in the Resource Symbols dialog box.
- Close the New Symbol dialog box by clicking OK.
- Close the Symbols Browser by clicking OK.
You can now rename your resources using the symbols you created
without worrying about whether the symbol has already been defined.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 12/14/2005 |
---|
Keywords: | kbtshoot kbBug kbnofix kbui KB141345 kbAudDeveloper |
---|
|