Link to home
Start Free TrialLog in
Avatar of Snakie1066
Snakie1066

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Snakie1066
Snakie1066

ASKER

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
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
This answer was right on. Thanks.
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.