BUG: Deleting Resources - Previous IDs Orphaned in Resource.h

Article translations Article translations
Article ID: 199039 - View products that this article applies to.
This article was previously published under Q199039
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SYMPTOMS

When a resource is deleted, the resource ID remains in the Resource.h file. This could cause problems, such as duplicate IDs or a deleted resource that is displayed at runtime using the old ID. The compiler does not flag the unassigned resource IDs.

RESOLUTION

Open the resource header files, and delete the ID definitions for all resources that have been deleted from the resource script. Also, verify that your code is not referencing these deleted IDs.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create an MFC AppWizard (exe) project.
  2. Insert three dialog resources.
  3. On the File menu, click Save All. This updates the Resource.h file with the new IDs.
  4. Delete the dialogs in the Resource Editor.
  5. On the File menu, click Save All.
  6. Open the Resource.h file in Visual C++.
RESULT: The three dialog resource IDs are in the Resource.h, even though they have been deleted from the resource script.

Properties

Article ID: 199039 - Last Review: February 21, 2014 - Revision: 1.1
APPLIES TO
  • Microsoft Visual Studio 6.0 Enterprise Edition
  • Microsoft Visual Studio 97 Service Pack 3
Keywords: 
kbnosurvey kbarchive kbbug kbide KB199039

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com