Resource Editor: Add/Remove operation is impossible ... read only (NOT)

I'm working with the mfcie sample application, I believe the most recent version.  Yesterday I was able to add menu items and add event handlers.  Today I attempt the same, am able to add the menu items, however upon attempting to add the event handler, after specifying the class to associate it with (the CMfcieView class), I get the message:

"Add/Remove operation is impossible, because the code element 'CMfcieView' is read only"

I check my folders, and sure enough the files are read-only, so I change them to not be, then try again.  Same error, in spite of verifying that the relevant file is NOT read-only.

I've tried restarting both Visual Studio and my computer a couple of times, the problem remains.  Thoughts/suggestions


Answer this question

Resource Editor: Add/Remove operation is impossible ... read only (NOT)

  • Jared Turner

    I have the same problem with DHTMLExplore sample also. The resource file is locked until Visual C++ is closed (ilocked even after the solution is closed) . I have to save the resource to a different name and close Visual Studio, and then replace the old rc file.

    I am using VS2005 July CTP.



  • Martin Dekker .

    Has this issue been resolved

    This posting in Feb, 2006 - original "We'll look into it" was in July...

    I am working in the current release version of 2005 and have encountered this error. I've tried everything I could find in the posts - cleaning, regetting the whole solution from SourceSafe, deleting the ncb file, checking the whole solution out, etc. etc.

    No luck...


  • Newbie_Reza

    The problem repeats.  Again, I'm working with the mfcie sample application... I add a bunch of menu items to a menu, then go back and attempt to add an event handler to one of them (the usual approach, right-click on the menu item, select Add Event Handler), and I'm getting the same message, though on a different computer:

    "Add/Remove operation is impossible, because the code element 'CMfcieView' is read only".

    I'd say it qualifies as a bug at this point.  I have verified that the file is NOT read only.  So far this only occurs with the mfcie sample application; I tried to re-create it from a newly created application without success.

    A helpful suggestion would definitely be appreciated.  At this point I'm about to give up on the beta and go back to VC2003.


  • BSeibel

    Hi Pete

    Check out the thread

    MSDN Forums Visual C++ Visual C++ General Re: Resource Editor: Add/Remove Operation impossible code read only - Release VS2005

    I started a new one with regard to this problem in the release version. and will be following it there.


  • Luiz Peres

    I'm getting the same problem.  MFC app, dialog in resource editor, double click on button to create event handler - BANG - same error as above in this thread.

    Pete



  • John in SF

    Hi all,

    We have identified this bug and are in the process of investigating the fix. Thanks for helping us find it :)

  • Sheo Narayan

    Pete - I found a workaround - it's awkward, but in a pinch might work. The problem on my system seemed to be a source control issue.

    - Check out the whole project from source control
    - Copy the project to a new directory
    - Clean it entirely (remove ncb, aps, intermediate directories)
    - Remove all source control references - *.scc, *.vspscc files
    - Edit the vcproj file in a text editor and remove Scc references:
    In my file the lines looked like:
    SccProjectName="SAK"
    SccAuxPath="SAK"
    SccLocalPath="SAK"
    SccProvider="SAK"
    Sometimes there are paths here instead of "SAK"
    - Open the cleaned project, but don't build (don't know if this has any effect)
    - Dialogs were now showing Control Handlers and I could add new ones
    - Add all handlers needed (I didn't bother with filling them out)
    - Do a diff on the directories and copy changed files back to the original location.

    This is a painful process, but at least it got me going.

    I tried removing it from source control in the original project, but this did not seem to work.


  • kevM

    Some additional information... when I moved the solution directory to another computer with the VC beta installed it worked fine.  So far as I'm concerned this solves the problem (for me), as I'd intended to work on the other computer anyway.
  • Resource Editor: Add/Remove operation is impossible ... read only (NOT)