Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disappearing classes? 1

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
I have been programming for 15 years, but have never touched C in my life. I decided I wanted to learn, so I've been trying out the tutorials in the MSDN library. I started with the MFC tutorial that creates the Scribble application.

Toward the end of Step 1, right around the time I added the Message Handlers for LButtonDown, LButtonUp, and MouseMove, the View class disappeared out of my class list. Here's the confusing part: the program still compiles and links error-free, and the app works properly. I can still see and edit the ScribbleView.cpp and .h files in FileView, but the Wizard doesn't show the class at all, and I get absolutely no pop-up tooltips on commands when I edit the files.

So, I have 2 questions. 1: any clues on what the heck happened? 2: is there a file that determines what shows up in the ClassView pane in the workspace that I might be able to edit to bring it back?
 
Did you press del key accidentally after clicking one file on the project? If yes, then add this file again to project. John Fill
1c.bmp


ivfmd@mail.md
 
I deleted the workspace, created a new one, and added the project to it...that fixed the problem. Since I don't know much about the structure of VC++ yet, I'm not sure why this worked, or how it happened in the first place. Any ideas?
 
You deleted accidentally a file from the project(not from the hdd). Or you've created this file outside the project. In this case VC++ does not recognize your files. It recognizes them only if they are part of your project. John Fill
1c.bmp


ivfmd@mail.md
 
This is a neat "feature" I, and another co-worker, have also encountered with Visual C++ 6.0. What seems to be happening is that when adding a function to the files, VC gets a bit confused and drops the file from the Class Wizard reference. If you look in the file view tab, you should still see the .h and .cpp files as part of the project. The simplest solution. Open the .h and .cpp file, hit space and then undo in each file. This causes VC to rescan the files and put the class references back.

Hope this helps.
 
I have the same problem. It didn't start until I started using windows 2000 professional. If anybody has a solution to this problem, please let us know. I hate having to edit the header file each time the class gets dropped from classview.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top