You cannot open a resource file in the resource editor and you may receive a "This file is already open in an editor" error message in Visual C++ (168405)



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
  • Microsoft Visual Studio, Enterprise Edition 6.0

This article was previously published under Q168405

SYMPTOMS

The ResourceView may become confused and fail to open a resource file even though the file is already open in the resource editor. Visual Studio may generate an error dialog saying "This file is already open in an editor" and the string "Load Failed" will appear below the bug project's resources. The MORE INFORMATION section below documents how this might occur.

CAUSE

The .rc file is already open in an editor.

RESOLUTION

Close the .rc file already open in the development environment then reopen the resource file for the project.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a new MFC AppWizard (exe) project named "Test". Use the default settings by pressing the Finish button on the first step of the AppWizard.
  2. On the File menu, click Open.
  3. Type Test.rc in the File Name box.
  4. In the Open As list, select Text, and then click OK.
  5. On the Workspace pane, click the ResourceView tab.
  6. Expand Test Resources to see the Test project's resources. The error message appears.
  7. Close Test.rc in the text editor and repeat step 6.

Modification Type:MinorLast Reviewed:8/11/2005
Keywords:kbtshoot kberrmsg kbide kbprb KB168405 kbAudDeveloper