CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: visual studio, resource file error : opened in another editor

  1. #1
    Join Date
    May 2015
    Posts
    277

    visual studio, resource file error : opened in another editor

    Hello,

    I have a resource file, and when i try to open, i get error saying, opened in another editor. (eventhough it is not opened anywhere else) !

    thanks
    pdk

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,759

    Re: visual studio, resource file error : opened in another editor

    It usually means that either this .rc file is already opened (for instance as a text file) or some of the included (.h, .rc, .rc2 ...) files is/are opened. Try to find all of them and close.
    Victor Nijegorodov

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,193

    Re: visual studio, resource file error : opened in another editor

    Quote Originally Posted by pdk5 View Post
    Hello,

    I have a resource file, and when i try to open, i get error saying, opened in another editor. (eventhough it is not opened anywhere else) !

    thanks
    pdk
    How are you trying to open it?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.7.0)

  4. #4
    Join Date
    May 2015
    Posts
    277

    Re: visual studio, resource file error : opened in another editor

    I am actually unable to attach an image here.

    I tried to click on the .rc file, which opened the resource viiew, In the resource view, under the .rc file, I see that " opened in another editor". for this file. Other .rc files are ok
    I have tried to closing/opening the visual studio and also tried to close notepad etc where it might have opened ...
    But no luck

  5. #5
    Join Date
    May 2015
    Posts
    277

    Re: visual studio, resource file error : opened in another editor

    I tried to insert the image(.png file) here, but not getting uploaded. not sure why ! Nothing working today

  6. #6
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,193

    Re: visual studio, resource file error : opened in another editor

    Quote Originally Posted by pdk5 View Post
    I tried to insert the image(.png file) here, but not getting uploaded. not sure why ! Nothing working today
    We know! There's been an attempt at an 'upgrade' to the forum which hasn't gone as smoothly as expected. Hopefully normal service will be resumed shortly.
    Last edited by 2kaud; May 23rd, 2020 at 07:55 AM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.7.0)

  7. #7
    Join Date
    May 2015
    Posts
    277

    Re: visual studio, resource file error : opened in another editor

    Thanks a lot kaud . I'll try uploading once it is fixed.

    Again thanks a lot, for taking time respond to my queries, appreciate a lot.

  8. #8
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,759

    Re: visual studio, resource file error : opened in another editor

    Quote Originally Posted by pdk5 View Post
    I have tried to closing/opening the visual studio and also tried to close notepad etc where it might have opened ...
    But no luck
    Try to close all the documents opened in the VS.
    Victor Nijegorodov

  9. #9
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,193

    Re: visual studio, resource file error : opened in another editor

    You don't normally 'edit' a resource file. You usually change via the Resource Editor. In Solution Explorer, under Resource Files, you should see your .rc file. if you double click this you should see the Resource View window showing Dialog, Icon, Menu etc. Expanding these shows what resources are available. Double clicking one will enable that resource to be changed using the resource editor.

    If, when you see the .rc files you right click then click 'Open With', you get a list of available ways to edit the resource - including editors etc. If you have the resource open in the Resource Editor, then you are asked to close it. If you choose to edit using say the C++ Source Code Editor and then try to open the resource with the Resource Editor, then you get the error 'Opened in another editor'. If you don't have it open in VS, then another program is accessing it. VS wants the file to be opened exclusively and not opened for sharing. Typically, this other program might be Explorer or other file management program.
    Last edited by 2kaud; May 23rd, 2020 at 08:18 AM. Reason: Remove double post
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.7.0)

  10. #10
    Arjay's Avatar
    Arjay is online now Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,318

    Re: visual studio, resource file error : opened in another editor

    Reboot the computer.

  11. #11
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,193

    Re: visual studio, resource file error : opened in another editor

    To find out what process has a file/folder open, you can use sysinternals (now part of Microsoft) procexp. See

    https://docs.microsoft.com/en-us/sysinternals/
    https://docs.microsoft.com/en-us/sys...nternals-suite
    https://docs.microsoft.com/en-us/sys...ocess-explorer
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.7.0)

  12. #12
    Join Date
    May 2015
    Posts
    277

    Re: visual studio, resource file error : opened in another editor

    Thanks a lot . I tried to use the old branch and proceeded with my changes (as this issue was not seen there). So I can merge later. I will try the suggestions. Thanks a lot Very helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)