resource.h 并非由 Microsoft Visual Studio 创建的资源文件。 是否覆盖现有文件?

1.直接点“是”试试

2.在解决方法试图双击一下resource.h,当询问是否关闭时,选择“是”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
https://marketplace.visualstudio.com/items?itemName=DonAirey.ResourceGenerator&ssr=false#qna This package contains a custom tool that can be used to replace the PublicResXFileCodeGenerator that Microsoft uses by default to generate resources. The biggest problem with the Microsoft default code generator is that the generated constructor is protected, which means that it can’t be used to construct strongly-typed resources in Visual Studio in Portable Class Libraries (PCL). Simply replace the PublicResXFileCodeGenerator custom tool on all the resources with ResourceGenerator and a portable version of the resources will be generated. To create portable resources, start with a Portable Class Library project. Create a directory for your resources (e.g. Strings, this step is optional). The right click on the project, select “Add…” and select Resources File from the options. Name the file whatever you want (e.g. Resources, Errors, etc.) and hit Add. Select the .RESX file from the Solution Explorer window and hit F4 to get to the properties. In the Custom Tools property, remove ResXFileCodeGenerator or PublicResXFileCodeGenerator and type in ResourceGenerator. Now your solution can use these strings from code or XAML, in WPF, Windows 8 or UWP projects. To add localization, create a copy of the resource file and add extensions for the cultures you want to support, such as en-GB, fr-FR or any other combination. After adding the resource file, updating the extension, and translating the text (I’m a big fan of Google Translate for this part), you will need to remove the ‘Custom Tool’ property and make sure that each of the culture files has an Embedded Resource as a Build Action. The directory should look like this:
可再发行编码 - 有限使用: msjet35.dll msjint35.dll msjter35.dll msrd2x35.dll msrepl35.dll expsrv.dll vbajet32.dll msexch35.dll msexcl35.dll mspdox35.dll msltus35.dll mstext35.dll msxbse35.dll MSJTOR35.DLL MSJT4JLT.DLL mdac_typ.exe msorcl32.dll msdaora.dll 可再发行代码 - 扩展的使用: comct232.ocx comct332.ocx comctl32.ocx comdlg32.ocx dblist32.ocx hhctrl.ocx mci32.ocx msadodc.ocx mschrt20.ocx mscomct2.ocx mscomctl.ocx mscomm32.ocx MSDatGrd.ocx msdatlst.ocx MSDatRep.ocx msflxgrd.ocx mshflxgd.ocx msinet.ocx msmapi32.ocx msmask32.ocx msrdc20.ocx mswinsck.ocx picclp32.ocx richtx32.ocx sysinfo.ocx tabctl32.ocx wbclsdsr.ocx anibtn32.ocx dbgrid32.ocx gauge32.ocx graph32.ocx grid32.ocx gswdll32.dll keysta32.ocx mschart.ocx msoutl32.ocx spin32.ocx threed32.ocx adodcchs.dll cmct2chs.dll cmct3chs.dll cmctlchs.dll cmdlgchs.dll datgdchs.dll datlschs.dll DatRpchs.DLL DBGRDCHS.DLL dblstchs.dll flxgdchs.dll mcichs.dll MsCc2chs.dll msch2chs.dll MSCMCCHS.DLL MSCOMCHS.DLL MSHFGCHS.DLL inetchs.dll MSMPICHS.DLL MSMSKCHS.DLL rdc20chs.dll WINSKCHS.DLL pcclpchs.dll rchtxchs.dll SYSINCHS.DLL TABCTCHS.DLL mswcrchs.dll MSCHTCHS.DLL 可再发行代码 - 标准: oleaut32.dll secur32.dll compobj.dll ole2.dll ole32.dll olecnv32.dll olethk32.dll rpcltc1.dll rpcltc5.dll rpcltccm.dll rpclts5.dll rpcltscm.dll rpcns4.dll rpcrt4.dll rpcss.exe storage.dll stdole2.tlb stdole32.tlb imagehlp.dll dllhost.exe comcat.dll iprop.dll rpcmqcl.dll rpcmqsvr.dll olepro32.dll asycfilt.dll mfc40.dll msvcrt40.dll dcomcnfg.exe oledlg.dll ciscnfg.exe dcomcnfg.hlp IE4\MSJavx86.exe os\system\atl.dll os\system\ansi\atl.dll VB98\template\code\loadres.bas VB98\template\code\RegKeys.BAS VB98\template\controls\ListBtns.frm VB98\template\controls\ListBtns.frx VB98\template\controls\listpick.frm VB98\template\controls\listpick.frx VB98\template\controls\tvlv.frm
作者:Nick Randolph, David Gardner 出版日期:July 28, 2008 出版社:Wrox Press 页数:1032 ISBN:ISBN-10: 0470229888 ISBN-13: 978-0470229880 文件格式:PDF 书籍简介 Product Description Professional Visual Studio 2008Microsoft Visual Studio 2008 is the latest version in the ongoing evolution of the Integrated Development Environment (IDE), and this resource examines the diverse facets of the IDE—from common tasks to intricate functions to the powerful tools that accompany the main code editing and design windows. Written by a unique author duo and offering an in-depth look at the powerful and fascinating features and techniques of the IDE, this book explores each aspect of the development life cycle from the perspective of how Visual Studio 2008 can make your life easier. Each chapter is packed with examples that illustrate uses for various tools, commands, and shortcuts of Visual Studio 2008. You will gradually learn to identify where a feature is used, conclude how you can use it to its fullest potential, and then seamlessly apply that feature to help solve real-world problems. What you will learn from this book How to create project templates and wizards Methods for using IntelliSense, code refactoring, class modeling, and unit testing Tips for using DataSets, LINQ, and Synchronization Services for working with data How to build web applications using ASP.NET AJAX, Silverlight, and ASP.NET MVC Ideas for building Office and Mobile applications, WPF, WCF, and WF projects Ways to effectively analyze and identify bugs using the advanced debugging features How to automate repetitive tasks using the Visual Studio 2008 add-ins and macros Suggestions for using Visual Studio Team System components coupled with Team Foundation Server Techniques for building more secure applications Who this book is for This book is for programmers who want to become proficient with the latest version of Visual Studio and are interested in the advanced capabilities of the IDE. Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job. From the Back Cover Professional Visual Studio 2008 Microsoft Visual Studio 2008 is the latest version in the ongoing evolution of the Integrated Development Environment (IDE), and this resource examines the diverse facets of the IDE—from common tasks to intricate functions to the powerful tools that accompany the main code editing and design windows. Written by a unique author duo and offering an in-depth look at the powerful and fascinating features and techniques of the IDE, this book explores each aspect of the development life cycle from the perspective of how Visual Studio 2008 can make your life easier. Each chapter is packed with examples that illustrate uses for various tools, commands, and shortcuts of Visual Studio 2008. You will gradually learn to identify where a feature is used, conclude how you can use it to its fullest potential, and then seamlessly apply that feature to help solve real-world problems. What you will learn from this book How to create project templates and wizards Methods for using IntelliSense, code refactoring, class modeling, and unit testing Tips for using DataSets, LINQ, and Synchronization Services for working with data How to build web applications using ASP.NET AJAX, Silverlight, and ASP.NET MVC Ideas for building Office and Mobile applications, WPF, WCF, and WF projects Ways to effectively analyze and identify bugs using the advanced debugging features How to automate repetitive tasks using the Visual Studio 2008 add-ins and macros Suggestions for using Visual Studio Team System components coupled with Team Foundation Server Techniques for building more secure applications Who this book is for This book is for programmers who want to become proficient with the latest version of Visual Studio and are interested in the advanced capabilities of the IDE. Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
mfc resource.h文件的id重定义通常是由于在项目中引入了重复的id定义导致的。 该问题通常会导致编译错误,因为编译器无法区分重复的id定义应该对应哪个源。为了解决这个问题,我们可以采取以下步骤: 首先,打开resource.h文件,查找重复的id定义。重复的id通常是在不同的源类型中使用相同的数值。这可能是因为在添加新的源时,没有检查已有的id定义。 找到重复的id定义后,可以采取以下解决方法之一: 1. 修改已有的源的id:将一个或多个重复的id改为不同的数值。这样可以确保每个源类型都有唯一的id。 2. 删除重复的源:如果重复的源不是必需的,可以选择删除其中一个。删除后,记得在代码中不再使用该源的id。 3. 使用命名空间:在源id定义之前添加命名空间可以避免id的重定义。通过命名空间,可以为不同的源类型提供独特的标识符范围。 4. 检查源的导入方式:如果源文件是从其他项目或库引入的,确保没有重复导入相同的源文件。 5. 更新编译设置:如果以上方法都没有解决问题,可能需要更新编译设置。在项目属性中,检查源的编译输出选项,并确保没有重复编译相同的源文件。 最后,重新编译项目,看看是否还存在id重定义的问题。如果问题仍然存在,可能需要进一步检查代码和源的使用情况,确保所有的id定义都是唯一的。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值