Microsoft KB Archive/182324

= FIX: Component Gallery Errors with Read-Only Project Files =

Article ID: 182324

Article Last Modified on 12/1/2003

-

APPLIES TO

 The Component Gallery, when used with:  Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.2 Professional Edition

 Microsoft Visual C++ 5.0 Enterprise Edition

 Microsoft Visual C++ 5.0 Professional Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q182324

<div class="symptoms_section">

SYMPTOMS
When inserting a standard MFC component from the Component Gallery, a message box appears with the following text:

Errors encountered:

<a long list with no filenames>

Continuing may render your project unbuildable. Continue?

Clicking Yes causes the Visual C++ IDE (Integrated Development Environment) to hang.

Other components may provide other errors indicating that the insertion failed. Some state that the control has probably already been added to the project.

<div class="cause_section">

CAUSE
Source file permissions are read-only, perhaps due to source control.

<div class="resolution_section">

RESOLUTION
Change the source file permissions to permit write access. In a source control environment, this may require checking out the file, or having the file's current owner check it back in.

<div class="status_section">

STATUS
In Visual C++ version 6.0, the IDE no longer hangs when the Yes button in the previous error message is clicked. However, the inability to add controls to read-only files is a restriction of the operating system and is by-design.

<div class="moreinformation_section">

Steps to Reproduce Behavior

 * 1) Create a new MFC AppWizard (exe) project.
 * 2) Change the file permissions to read-only for all files except the .ncb file.
 * 3) On the Project menu, click Add to Project, and then click Components and Controls.
 * 4) Select Visual C++ Components, and insert a status bar (select "use the system defaults" in the wizard).

NOTE: The message box described in the SYMPTOMS section appears.
 * 1) Click Yes.

RESULTS: The Visual C++ IDE will hang in versions before Visual C++ version 6.0.

For additional information, please see the following article in the Microsoft Knowledge Base:

182323 BUG: ClassView Add... Errors with Read-Only Project Files

Keywords: kberrmsg kbbug kbfix kbide kbvc600fix kbprb kbwizard KB182324

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.