0
votes

I'm working with an MFC application using Visual C++ 6.0. When I double-click on one of the elements of a dialog box in Resource View, I get the error "Cannot add new member."

I understand that the source of this might be corrupted metadata in the source files associated with that resource.

Do you know any methods for determining what precisely is causing the problem and fixing it?

1
If you have version control system setup, do a diff with the base version would reveal it.Sheng Jiang 蒋晟
I don't know how many versions ago the problem started.Isaac Moses

1 Answers

3
votes

Usually when this I happens I delete the Project's Class wizard file ([projectname].clw) and that will clear up the problems.

You can also delete the project's browser file - that will often clean up wierd problems ([projectname].ncb).

You may need to stop Visual Studio, delete the file(s), then restart & reopen the project.

After you delete the .CLW when you try to invoke the class wizard it will state that it is missing and would you like to rebuild it, select Yes/OK and then it will ask you what source files (It will default to all the files in your project) - make sure that seems appropriate and proceed.

The NCB will be re-created quietly in the background without any intervention.