?
Solved

VC++ 6.0 ClassWizard Error

Posted on 1998-11-09
9
Medium Priority
?
613 Views
Last Modified: 2011-09-20
Strange problem just started happening with VC++ 6.0 ClassWizard.  

1) I'm trying to add a new message handler to a class
2) I open CW and choose object ID, message, and click Add Function.
3) I then click on Edit Code and get a dialog which says:
"Error while updating file(s)(...gives name of files here...) for class CMainDialog"
4) No further information is given about this error.
5) I did delete the clw file and rebuilt the database, no effect.
0
Comment
Question by:jhance
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 1

Expert Comment

by:TheGrinch
ID: 1177308
I've had this problem in VC++ 5, and it drove me NUTS!

Here's how I solved the problem...

Make sure the files that the ClassWizard is going to modify are open in the editor. Then the problem never happens.

(I've searched the Microsoft Knowledge base on this problem, and haven't found anything.)
0
 
LVL 32

Author Comment

by:jhance
ID: 1177309
Nice try, it even seemed logical.  Too bad it didn't work.
0
 
LVL 1

Expert Comment

by:TheGrinch
ID: 1177310
Well, VC++ 6 still has problems in this general area.
This works with VC++ 5.
Hoped it would help you, too.
Good luck.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 32

Author Comment

by:jhance
ID: 1177311
Adjusted points to 200
0
 
LVL 2

Expert Comment

by:rayb
ID: 1177312
Did you apply service pack 1 yet?
http://msdn.microsoft.com/visualc/default.asp
0
 
LVL 32

Author Comment

by:jhance
ID: 1177313
Yes, I have installed the service pack.  Further, if you read the release notes to the SP, there is no indication of a fix for a problem of this type.
0
 
LVL 1

Accepted Solution

by:
fstab earned 600 total points
ID: 1177314
You might have the wrong permissions (don't ask me how) or file attributes for the file into which CW is writing into. Try removing read attribs and use CW again. Another possibility is that you might have changed the class's name somewhere in the header file (in the Message Maps maybe?) - do a case insensitive search for your class name and maybe this'll do the trick.
0
 
LVL 32

Author Comment

by:jhance
ID: 1177315
fstab,

You may be on to something here.  It's not the file attribs, there are no read-only files set but I got to looking at the maindlg.h file and found that everything between the:


      // Generated message map functions
      //{{AFX_MSG(CMainDialog)

and the

      //}}AFX_MSG

had been duplicated many times.  I deleted all of the extra ones and tried to add a message handler again.  No go, BUT the entire list of message maps was duplicated again.  Each time I try and add the message map, the list is duplicated again.

Any further ideas?


0
 
LVL 32

Author Comment

by:jhance
ID: 1177316
Well, I did find the problem.  It's not what you said but your comment got me looking the the right area.  The situation was that one of my message map function declarations in the header file had somehow gotten outside of the ClassWizard commented block.  When I moved it back where it belonged, everything was OK.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

777 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