• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Simple VC++ IDE Question

Hello. This is a VC++6 with SP5 question.

OK, from a dialog-based hello world with MFC AppWizard for EXEs, I added a button to the base dialog. I double clicked on the button to define the contents of the function, taking me to the code for the OnButton1 function. As I arrowed off of the highlighted MFC comment, the whole &(*#U! class definition disappeared from the classview pane. It is not restored to the classview when I reload the project. If I invoke the Class Wizard manually and select the message for the object, etc, there is no problem. Why is double-clicking so bad?

I want to know 2 things:

1. What exactly is the cause of this disappearance? (so that I can avoid it in the future)
2. What can I do to cause the missing classes to reappear in the ClassView pane? (so that I can "fix" messed-up projects.

Thanks,

Clayton
0
Snakie1066
Asked:
Snakie1066
  • 3
1 Solution
 
Roshan DavisCommented:
1. This is becoz of corruption of class wizard file.
2. delete the .clw file from ur project.
Next time, pressing Ctrl+W ( class Wizard), VS will ask for create the ClassWizard file. Pressing yes, will do the creation of new .clw.

GOOD LUCK
0
 
Snakie1066Author Commented:
OK, thank you for your comment. First off, 1 should be more specific, ie: "It is a known bug that double-clicking a button in dialog screws up your class view stuff" or something like that, although it would make sense that it is that file. I want to know what NOT to do specifically within the IDE.

Now the real problem: deleting that .CLW file did not fix the problem and bringing up the class wizard did not cause the .CLW file to be recreated. There are no new files in the directory yet the Class View contains the same information  that it did before I deleted the file. I don't know where it's keeping this class info, but it must be in some other file. Do you know which one that might be?

Thanks,

Clayton
0
 
Snakie1066Author Commented:
Hello. I take back that last comment. I tried your solution again today and it worked fine. Then I tried it again and it had problems. I think it's a matter of "gently" selecting to create a function, then editing it rather than skipping steps by double clicking, either in the dialog editor OR in the class wizard. Your answer was right, so my bad. I was also able to get the class "back" by fudging the AFX_headerfilename_h_guid declare at the top of the .h file for that class. Anyway, here are your pointes. :)

Clayton
0
 
Snakie1066Author Commented:
This answer was right on. Thanks.
0
 
tcutler1aCommented:
For me, it was insufficient to remove the *.clw file. I removed the *.ncb, *.plg, *.opt files, then rebuilt the class file and recovered the class in the classview pane.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now