Add/Remove Operation is not possible because the code element is read only
Hi all,
Actually i am new to VC2005. My problem is whenever i am trying to add any function say OnCtlColor to my class a message is displayed that Add/remove operation is not possible because the code element is read-only.
I am not getting how to correct it...
Can anybody help me in correcting it...
Thanks in advance
Re: Add/Remove Operation is not possible because the code element is read only
You deleted some things. No problem, try on another new one from the start. There is always NEXT, NEXT NEXT PROJECT to move on.
Re: Add/Remove Operation is not possible because the code element is read only
Quote:
Originally Posted by vjshankwar
Add/remove operation is not possible because the code element is read-only.
.
.
Can anybody help me in correcting it...
Not realy. Consider posting your project, since this is the only way to test it and find a solution.
Re: Add/Remove Operation is not possible because the code element is read only
This has nothing to do with your code at all.
Do you use any version control tools? That can be the cause.
It could be a VS problem. I would suggest that you make sure that the folder containing your project is not read-only. Right click on the folder and select properties. Then try again.
If that does not help, it might help to clean the solution and do a new build.
I had similiar problem once and the above steps was successful.
Re: Add/Remove Operation is not possible because the code element is read only
Quote:
Originally Posted by laitinen
This has nothing to do with your code at all.
yOU ARE CORECT; thank you for spotting.
I meant "project" and i will change it. :wave:
Re: Add/Remove Operation is not possible because the code element is read only
Deleting of many auxiliary solution and project files include *.ncb of "Visual Assist" solves this my problem.
Re: Add/Remove Operation is not possible because the code element is read only
I met this problem. (VS2008). My solution was to create a new project or add message handlers by myself (not using wizard). I don't know the reason :(