The resource view does not reflect the changes made to the .RC file even if you have changed a resource script and Visual C++ compiler reloads it (173165)



The information in this article applies to:

  • 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 5.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0
  • Microsoft Visual Studio 97

This article was previously published under Q173165

SYMPTOMS

If you have altered a resource script outside of the resource editor (for example, by hand or by using a version control system), Developer Studio notices the change and asks you if you want to reload.

If you answer yes, the reload seems to succeed and no error message appears. However, the resource view does not reflect the changes made to the .RC file outside of the resource editor, even if you reload it.

CAUSE

The resource editor generates and uses a .APS file. This file contains a binary format of the resources. This file is not recompiled when the resource script is changed outside of Developer Studio. Only replacing the .RC and RESOURCE.H resource files is not sufficient if you want the resource view to reflect the changes made to the resources.

RESOLUTION

To work around this problem:

  • Make sure that the project is closed. Replace the .APS , .RC and RESOURCE.H files. -or-

  • Make sure that the project is closed. Delete the .APS file and replace both the .RC and RESOURCE.H files. In this case, the project compiles a new .APS file that reflects the changes in the .RC file.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new MFC-SDI project called MYAPP with the AppWizard.
  2. In the resource editor, change the resource ID for menu item "File-New" from ID_FILE_NEW to ID_NEW.
  3. On the File menu, select Save All.
  4. Backup MYAPP.RC and RESOURCE.H from the project directory to another location.
  5. Revert the resource ID for "File-New" to ID_FILE_NEW.
  6. On the File menu, select Save All.
  7. Restore the backup files MYAPP.RC and RESOURCE.H.
  8. Developer Studio notices the change and asks you to reload resource. Click "yes".
  9. Examine the Properties for menu item "File-New".
  10. The resource ID for "File-New" should have been restored to ID_NEW, but it is still ID_FILE_NEW.
  11. If you Save All, the MYAPP.RC and RESOURCE.H files will be overwritten with information from the MYAPP.APS file.

REFERENCES

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

135912 The latest modifications are not visible when you open resources in the Resource Editor

132340 Common file extensions used by Visual C++


Modification Type:MajorLast Reviewed:6/2/2005
Keywords:kbtshoot kbprb KB173165 kbAudDeveloper