Read Only? [modified]
-
Using VS2005 under Windows XP... I opened up a MFC dialog-based app project this morning, and added a button to the dialog. Then I did this: 1) Select the button 2) Click the Properties panel 3) Click the Events button in the properties panel 4) Select the BN_CLICKED item and specify a function name (I accepted the default function name) I got the following error message:
Add/Remove operation is impossible, because the code element 'CMyDialog' is read only.
Next, I tried going through the dialog box source file (CMyDialog.CPP) like so: 1) Place the cursor on the line that readsEND_MESSAGE_MAP()
2) Click the Properties panel 3) Click the Events button in the properties panel 4) Expand the tree for the desired control ID 4) Select the BN_CLICKED item and specify a function name (I accepted the default function name) The message changed a little, but it is essentially the same problem:Add/Remove operation is impossible, because the code element '(null)' is read only.
*NONE* of the files associated with the project are read-only. What the hell is happening here, and how do I fix it? -- modified at 11:36 Monday 16th April, 2007 I can add the handler by typing the code in by hand. This is freakin' stupid."Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I had this once. I cleared mine up by deleting the solution .ncb and .suo along with the project .vcproj. files. Judy
That worked, thanks. Kinda reminds me of VC6...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
That worked, thanks. Kinda reminds me of VC6...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001well you know that MS has basically ignored c++ in the last 3 releases so this shouldn't be surprising in the least. :laugh:
-- CleaKO The sad part about this instance is that none of the users ever said anything [about the problem]. Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
-
I had this once. I cleared mine up by deleting the solution .ncb and .suo along with the project .vcproj. files. Judy
-
JudyL_FL wrote:
the project .vcproj. files
damn html thingies this should read the .vcproj.<your user name> file The one time I don't preview my message, I get screwed :doh:
I just deleted the suo and ncb files, and that appeared to do the trick....
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Using VS2005 under Windows XP... I opened up a MFC dialog-based app project this morning, and added a button to the dialog. Then I did this: 1) Select the button 2) Click the Properties panel 3) Click the Events button in the properties panel 4) Select the BN_CLICKED item and specify a function name (I accepted the default function name) I got the following error message:
Add/Remove operation is impossible, because the code element 'CMyDialog' is read only.
Next, I tried going through the dialog box source file (CMyDialog.CPP) like so: 1) Place the cursor on the line that readsEND_MESSAGE_MAP()
2) Click the Properties panel 3) Click the Events button in the properties panel 4) Expand the tree for the desired control ID 4) Select the BN_CLICKED item and specify a function name (I accepted the default function name) The message changed a little, but it is essentially the same problem:Add/Remove operation is impossible, because the code element '(null)' is read only.
*NONE* of the files associated with the project are read-only. What the hell is happening here, and how do I fix it? -- modified at 11:36 Monday 16th April, 2007 I can add the handler by typing the code in by hand. This is freakin' stupid."Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Look for prototypes of no more existing functions! When this error occurs, you need to clean and rebuild your project, as many developers have already noticed. But before this, you need to read carefully the header file and look for prototypes of functions that existed once, and now do not exist anymore. Then: * DELETE all the unused prototypes * close the solution * delete following files: del YOURPROJECT.sln del YOURPROJECT.suo del YOURPROJECT.ncb del YOURPROJECT.aps del YOURPROJECT.vcproj.COMPUTER.ap.user del DEBUG\*.* /Q del RELEASE\*.* /Q rd DEBUG rd RELEASE * open YOURPROJECT.vcproj and rebuild solution
-
Using VS2005 under Windows XP... I opened up a MFC dialog-based app project this morning, and added a button to the dialog. Then I did this: 1) Select the button 2) Click the Properties panel 3) Click the Events button in the properties panel 4) Select the BN_CLICKED item and specify a function name (I accepted the default function name) I got the following error message:
Add/Remove operation is impossible, because the code element 'CMyDialog' is read only.
Next, I tried going through the dialog box source file (CMyDialog.CPP) like so: 1) Place the cursor on the line that readsEND_MESSAGE_MAP()
2) Click the Properties panel 3) Click the Events button in the properties panel 4) Expand the tree for the desired control ID 4) Select the BN_CLICKED item and specify a function name (I accepted the default function name) The message changed a little, but it is essentially the same problem:Add/Remove operation is impossible, because the code element '(null)' is read only.
*NONE* of the files associated with the project are read-only. What the hell is happening here, and how do I fix it? -- modified at 11:36 Monday 16th April, 2007 I can add the handler by typing the code in by hand. This is freakin' stupid."Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Look for prototypes of no more existing functions! When this error occurs, you need to clean and rebuild your project, as many developers have already noticed. But before this, you need to read carefully the header file and look for prototypes of functions that existed once, and now do not exist anymore. Then: * DELETE all the unused prototypes * close the solution * delete following files: del YOURPROJECT.sln del YOURPROJECT.suo del YOURPROJECT.ncb del YOURPROJECT.aps del YOURPROJECT.vcproj.COMPUTER.ap.user del DEBUG\*.* /Q del RELEASE\*.* /Q rd DEBUG rd RELEASE * open YOURPROJECT.vcproj and rebuild solution
-
Look for prototypes of no more existing functions! When this error occurs, you need to clean and rebuild your project, as many developers have already noticed. But before this, you need to read carefully the header file and look for prototypes of functions that existed once, and now do not exist anymore. Then: * DELETE all the unused prototypes * close the solution * delete following files: del YOURPROJECT.sln del YOURPROJECT.suo del YOURPROJECT.ncb del YOURPROJECT.aps del YOURPROJECT.vcproj.COMPUTER.ap.user del DEBUG\*.* /Q del RELEASE\*.* /Q rd DEBUG rd RELEASE * open YOURPROJECT.vcproj and rebuild solution
Pay attention to THE DATE. This thread is more than two years old.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
Look for prototypes of no more existing functions! When this error occurs, you need to clean and rebuild your project, as many developers have already noticed. But before this, you need to read carefully the header file and look for prototypes of functions that existed once, and now do not exist anymore. Then: * DELETE all the unused prototypes * close the solution * delete following files: del YOURPROJECT.sln del YOURPROJECT.suo del YOURPROJECT.ncb del YOURPROJECT.aps del YOURPROJECT.vcproj.COMPUTER.ap.user del DEBUG\*.* /Q del RELEASE\*.* /Q rd DEBUG rd RELEASE * open YOURPROJECT.vcproj and rebuild solution
Worked for me with Visual Studio 2008 Thanks! :thumbsup: :thumbsup:
-
Worked for me with Visual Studio 2008 Thanks! :thumbsup: :thumbsup:
Keep getting this problem in VS2008-SP1 (Win7 64bit) and all suggestion above don't seem to work for me??? Is there anything else I could do to get this sorted out. P.S. I'm getting this error while trying to add a handler to WM_LBUTTONUP in my view class!