Solved

Simple VC++ IDE Question

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 101
mapBully challenge 6 172
Message not shown 5 82
Increment column based of a FK 8 47
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

685 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