Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Read Only? [modified]

Read Only? [modified]

Scheduled Pinned Locked Moved Visual Studio
helpc++questiondata-structures
11 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    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 reads END_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

    J A 3 Replies Last reply
    0
    • realJSOPR realJSOP

      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 reads END_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

      J Offline
      J Offline
      JudyL_MD
      wrote on last edited by
      #2

      I had this once. I cleared mine up by deleting the solution .ncb and .suo along with the project .vcproj. files. Judy

      realJSOPR J 2 Replies Last reply
      0
      • J JudyL_MD

        I had this once. I cleared mine up by deleting the solution .ncb and .suo along with the project .vcproj. files. Judy

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • realJSOPR realJSOP

          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

          D Offline
          D Offline
          Dan Neely
          wrote on last edited by
          #4

          well 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?

          1 Reply Last reply
          0
          • J JudyL_MD

            I had this once. I cleared mine up by deleting the solution .ncb and .suo along with the project .vcproj. files. Judy

            J Offline
            J Offline
            JudyL_MD
            wrote on last edited by
            #5

            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:

            realJSOPR 1 Reply Last reply
            0
            • J JudyL_MD

              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:

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • realJSOPR realJSOP

                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 reads END_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

                A Offline
                A Offline
                alpalazzi
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • realJSOPR realJSOP

                  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 reads END_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

                  A Offline
                  A Offline
                  alpalazzi
                  wrote on last edited by
                  #8

                  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

                  realJSOPR S 2 Replies Last reply
                  0
                  • A alpalazzi

                    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

                    realJSOPR Offline
                    realJSOPR Offline
                    realJSOP
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • A alpalazzi

                      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

                      S Offline
                      S Offline
                      softwaremonkey
                      wrote on last edited by
                      #10

                      Worked for me with Visual Studio 2008 Thanks! :thumbsup: :thumbsup:

                      J 1 Reply Last reply
                      0
                      • S softwaremonkey

                        Worked for me with Visual Studio 2008 Thanks! :thumbsup: :thumbsup:

                        J Offline
                        J Offline
                        josip cagalj
                        wrote on last edited by
                        #11

                        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!

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups