Solved

Simple VC++ IDE Question

Posted on 2002-03-04
5
194 Views
Last Modified: 2013-11-20
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
Comment
Question by:Snakie1066
  • 3
5 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 50 total points
ID: 6840972
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
 

Author Comment

by:Snakie1066
ID: 6843591
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
 

Author Comment

by:Snakie1066
ID: 6845201
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
 

Author Comment

by:Snakie1066
ID: 6845219
This answer was right on. Thanks.
0
 

Expert Comment

by:tcutler1a
ID: 11740693
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now