如何停止 Visual C++在 MFC .rc 文件生成中使用本地计算机区域设置?
在 Visual Studio 资源视图中编辑资源时,我发现生成的 rc 文件中添加了许多区域设置特定信息。添加的区域设置信息特定于我的计算机当时运行的任何区域设置。这似乎是项目特定的设置,因为我与解决方案中的其他项目没有相同的问题。我尝试将项目的文化设置为默认和英语(美国),但这些设置似乎都没有任何区别。
除了手动编辑更改之外,还有其他方法可以防止添加计算机特定的区域设置资源吗?我忽略了哪些设置导致了这种行为?
When editing a resource in the Visual Studio resource view, I find that a lot of locale specific information is added to generated rc file. The locale information added is specific to whatever locale my machine is running at the time. It appears to be a project specific setting, because I don't have the same issue with other projects in the solution. I've tried setting the Project's culture to Default and English (US) but neither of these settings appear to make any difference.
Other than hand editing the changes away, is there a way to prevent machine specific locale resources being added? What setting have I neglected to set that is causing this behaviour?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,事实证明有一个#ifdef 块定义了位于文件中间位置的每个资源的区域设置。将该文件移动到顶部并通过 Visual Studio 重新生成 .rc 文件似乎可以解决问题。
Ok turns out there was a #ifdef block defining the locale for each resource loacated about halfway down the file. Moving that file to the top and regenerating the .rc file via Visual Studio seemed to do the trick.