Error using Event Wizard "...parent class code is read only"

  • Thread starter Thread starter John E Katich
  • Start date Start date
J

John E Katich

When attempt to use the Event Wizard I get the following error message:

"Add/Remove of the function impossible, because the parent class code is
read only"

The Project was convert from VC 6.0. The files in question do not have the
Read-Only Attribute on.


Any Ideas?
 
Hi John

Based on my understanding, the problem is you could not use the event
wizard to add a event handler to your MFC class which is converted from the
VC6 program. Please let me know if I have misunderstood anything.

In order to isolate your problem, would you please give us some more
detailed information about this problem:

1. Have you used some source control system with this MFC project, such as
the Visual Source Safe with the VStudio?

2. Is it a project-dependent issue--I mean if you have another VC6 MFC
project and convert it to VC2003, does this problem occur?

3.Which class you this problem with, is it a MFC generic class(e.g.
CButton) or a custom MFC class you derived?


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Gary,



Your basic understanding is correct.



1.. The project members are eventually saved in VSS. However, I don't
feel this is part of the problem, since the problem does happen on a PC that
is connected to VSS .


2.. I have not tried it on other projects, yet . See #3


3.. The class that fails is: cBaseFrame derived from CFrameWnd (class
cBaseFrame : public CFrameWnd)
1.. I have been flipping back to VC 6.0 and using Class Wizard to insert
the Event Functions framework (Menu Commands)
2.. If I specify a class derived from CWnd it works.. all is well


Seems that a class derived from CframeWnd is the problem.





Hope this helps..



JEK





Hi John

Based on my understanding, the problem is you could not use the event
wizard to add a event handler to your MFC class which is converted from the
VC6 program. Please let me know if I have misunderstood anything.

In order to isolate your problem, would you please give us some more
detailed information about this problem:

1. Have you used some source control system with this MFC project, such as
the Visual Source Safe with the VStudio?

2. Is it a project-dependent issue--I mean if you have another VC6 MFC
project and convert it to VC2003, does this problem occur?

3.Which class you this problem with, is it a MFC generic class(e.g.
CButton) or a custom MFC class you derived?


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi John,
1.. The project members are eventually saved in VSS. However, I don't
feel this is part of the problem, since the problem does happen on a PC that
is connected to VSS.

Except the concern of the VSS, this problem could be caused by some related
solution files being corrupted. In such scenario, you can try to
delete(rename) your solution's .suo file and .ncb file, then reload the
solution in the VS2003 IDE, the .suo file and .ncb file will be regenerated
by the IDE.

If the above workaround does not work, maybe you need to test your project
in another machine in order to check whether this is a VS2003 IDE(machine)
specific issue or a code deficit issue. If your project is OK in another
test machine, then there may be some problems in the VS2003 of your current
working machine, I suggest you can do a VS2003 reparation to it.


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top