windows Visual Studio 中使用的 .rc2 文件是什么

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1886777/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:34:36  来源:igfitidea点击:

What are .rc2 files used for in Visual Studio

c++windowsvisual-studio

提问by pankajt

I am new to Windows environment of development. I see a lot of .rc2 files used where a mapping is performed against some MACRO type constants to strings.

我是 Windows 开发环境的新手。我看到使用了很多 .rc2 文件,其中针对某些 MACRO 类型常量执行映射到字符串。

Q1. Why are these .rc2 files used?

一季度。为什么要使用这些 .rc2 文件?

Can someone give me a start on these.

有人可以给我一个开始。

采纳答案by Konamiman

From MSDN:

MSDN

The RC2 file can be included at the top of the RC file in a project. An RC2 file is useful for including resources used by several different projects. Instead of having to create the same resources several times for different projects, you can put them in an RC2 file and include the RC2 file into the main RC file.

RC2 文件可以包含在项目中 RC 文件的顶部。RC2 文件可用于包含多个不同项目使用的资源。不必为不同的项目多次创建相同的资源,您可以将它们放在一个 RC2 文件中,并将 RC2 文件包含到主 RC 文件中。

回答by Nic Strong

Another important point besides Konamiman's answer is that the .rc file is automatically built from the Visual Studio graphical resource edior. Therefore if you want any manually editted resources they need to be placed in the .rc2 file.

除了 Konamiman 的回答之外,另一个重要的点是 .rc 文件是从 Visual Studio 图形资源编辑器自动构建的。因此,如果您想要任何手动编辑的资源,则需要将它们放置在 .rc2 文件中。