How Remove a Class Once Added Using Class Wizard 
Author Message
 How Remove a Class Once Added Using Class Wizard

Hello,

I manually added a class in Class Wizard using the Add Class | New button.
This generated, of course a .cpp and .h file and added these files to the
Project's Source and Include folders.  I then decided to delete this class
and redefine it.  In an attempt to remove the class from the Project I
deleted the .cpp and .h files from the Project's Source and Include folders
and I also deleted the files themselves.  I also deleted the .clw file
thinking this would remove the class from Class Wizard's "records."

However, when I tried to Add Class | New with the same class name again (so
I could define it differently) Class Wizard said that the class name is in
use.  At this point I tried deleting the .aps file to no avail.

A grep shows that the class is referenced in a .ncb file but I don't know
what this is.  So can answer the following:

1) How do you delete a class that was created with Class Wizard?
2) What is the .ncb file?

Thanks,
Jim...



Sun, 25 Jul 2004 04:50:59 GMT  
 How Remove a Class Once Added Using Class Wizard
You've done everything you need to do except delete the NCB.  The NCB holds the
data for the ClassView tree.  When your project is closed, you can safely delete
the NCB.  When you reopen it, it will rebuild the file.  From time to time, the
NCB becomes corrupted or bloated, as well.  So it's a good idea to delete it
once a week or so.


Sun, 25 Jul 2004 08:49:02 GMT  
 How Remove a Class Once Added Using Class Wizard
Hi Jim,

Scot  is right. You need to delete the NCB file. Close the project
workspace, and delete the project's .ncb file.
When the project is reopened in Visual C++, the .ncb file will be
re-created with the correct information.  

NCB -- Parser information file:

This file contains information generated by the parser used by the class
view and component gallery.
If the file is accidentally or deliberately deleted, it is automatically
regenerated.

Best regards,
Billy Zhang
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 25 Jul 2004 10:56:08 GMT  
 How Remove a Class Once Added Using Class Wizard
Thanks much to both Scot and Billy!  That should clear this one up...

Jim...



Mon, 26 Jul 2004 11:20:48 GMT  
 How Remove a Class Once Added Using Class Wizard
The .ncb file is some sorta cache for the class-view.  
With MSVC6 it gets corrupted all the time.  You can safely
delete it and reload your workspace and it will be
recreated.

I did a similar thing with a MFC variable, and screwed my
whole project up :/  Seems like it could give you a hint
as to what wrong instead of display the generic 'can't
twiddle with scipt' error..

Quote:
>-----Original Message-----
>Hello,

>I manually added a class in Class Wizard using the Add
Class | New button.
>This generated, of course a .cpp and .h file and added
these files to the
>Project's Source and Include folders.  I then decided to
delete this class
>and redefine it.  In an attempt to remove the class from
the Project I
>deleted the .cpp and .h files from the Project's Source
and Include folders
>and I also deleted the files themselves.  I also deleted
the .clw file
>thinking this would remove the class from Class
Wizard's "records."

>However, when I tried to Add Class | New with the same

class name again (so

- Show quoted text -

Quote:
>I could define it differently) Class Wizard said that the
class name is in
>use.  At this point I tried deleting the .aps file to no
avail.

>A grep shows that the class is referenced in a .ncb file
but I don't know
>what this is.  So can answer the following:

>1) How do you delete a class that was created with Class
Wizard?
>2) What is the .ncb file?

>Thanks,
>Jim...

>.



Fri, 30 Jul 2004 11:51:02 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Trying to add a class with no base class in Class Wizard

2. Class Wizard won't add classes for dialogs

3. add class to class wizard

4. Defect in Class Wizard/Add Class

5. Adding a class derived from CObject via Class Wizard

6. Problem adding Class from Class Wizard

7. How to add an existing class to Class Wizard

8. Add derived classes to class wizard

9. Adding a base Class in Class Wizard

10. How to add class derived from CSocket from Class Wizard

11. Adding member variables for ActiveX using Class Wizard.

12. Problem using Class Wizard to add member variables

 

 
Powered by phpBB® Forum Software