Solved

Simple VC++ IDE Question

Posted on 2002-03-04
5
195 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 124
Detect CR LF to each line 12 154
VBA "SendKeys" Syntax for Multiple Keystrokes 7 103
lucky13 challenge 11 125
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

23 Experts available now in Live!

Get 1:1 Help Now