Link to home
Start Free TrialLog in
Avatar of ris
ris

asked on

MSDEV: ClassWizard often stops working

I use MS Visual C++ for most of my programming.  I like the classwizard, but it mysteriously becomes disabled on a regular basis.  Pressing Ctrl-W only causes a beep, and the ClassWizard option on all of the menus becomes disabled.  Also, double-clicking a control on a dialog template only brings up its properties instead of jumping to the code as when the classwizard is enabled.  Does anyone know why it does this and what can be done to bring the classwizard back other than deleting the .clw file associated with the project?
Avatar of radud
radud

1. One instance when the classwizard becomes disabled is when you remove a project (dsp) from your workspace (dsw).

2. Try deleting the <yourworkspace>.ncb file. It is a good idea to do that periodically.
There were a couple of cases I found ClassWizard to not respond in Visual C++ 4. In VC++ 6 I haven't had any problems.

The main-problem began for me when I was adding my own code to the functions where classwizard usually inserts it's code. The code was fully working without errors, but the classwizard gave problems. Have you added anything to the reserved classwizard code(s)?

What version of VC++ are you working with?

Regards,
CJ
Avatar of ris

ASKER

I use VC++ 6, with the latest service pack.

I can see how the classwizard would get corrupted if I removed a project from my workspace, but I haven't done that.  I did unload several projects from my workspace close to the last time it stopped working, but I'm not sure if that was exactly what caused it to stop working.

I try to avoid editing code that goes between those classwizard markers.  The only thing I ever do with it is delete code when the classwizard stops working and I need to remove a function.

I do have a theory on why it might have the silent failure that it has: I use local (C drive) project (dsp) and workspace (dsw) files which reference source code files which are shared on a network.  For reasons unknown to me, VC++ always puts the classwizard (clw) file on the network with the source code instead of on my local C drive with my project files.  This makes me think it may be possible somebody else is trying to share the CLW file with me, which is resulting in some kind of file-sharing-related error, which causes the shared CLW file to become corrupted.  Is there a way that I can tell VC++ where to put the CLW file?  It always seems to store it with my .rc file for some reason, though it may just be using the current working directory, or something else that I am unaware of...

In the event that the classwizard becomes disabled, is there a way within the VC++ environment to reenable it without closing the workspace and (manually) deleting files?  Some kind of "rebuild class wizard" command or something?  It's so annoying that it just stops working without any error messages, without any obvious method to repair the problem, and without any obvious cause.
ASKER CERTIFIED SOLUTION
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ris

ASKER

I was looking for more concrete/definate answers, but given the inactiivity of this question, I figure nobody knows.  Somebody may as well get some points for this though, so here ya go.