VS2019: How to resolve the “unknown sub-lang: 0x8” message in Resource View?

前端 未结 6 893
有刺的猬
有刺的猬 2021-01-12 19:06

I have recently started using Visual Studio 2019 for my C++11 project. VS2019 converted the project and it compiles into an executable. But I can\'t open my resource (.rc) f

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 19:53

    I've found a solution that worked for me.

    1. Open the *.rc file in the 'Code View' in Visual Studio.
    2. Search for the following section:
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD)
    LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
    #pragma code_page(1252)
    ...
    
    1. Comment the complete #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD) block and save the file.

    2. Open the file in the 'Resource View'. Close it. (Maybe you have to change and save something here)

    3. Reopen the *.rc file via the 'Code View' in Visual Studio. Uncomment the previously commented section and save the file.

    After this steps the problem was solved. I don't know which of the steps solved the problem but in the end this was my way to solve the issue.

    My solution was inspired by the following solution: https://www.codeproject.com/Questions/40860/Resource-file-opening-problem

提交回复
热议问题