译林出版社招聘:add/remove operation is impossible, because the code element is readonly 解决办法

来源:百度文库 编辑:九乡新闻网 时间:2024/07/07 10:52:21
Visual Studio弹出一个消息框提示:
MESSAGE: Resource Editor: Add/Remove operation is impossible, because the code element ''(null)'' is read only

解决方案是:
如果在这个出问题的类的头文件里定义了任何函数,把函数代码从头文件剪切到cpp文件里。关闭Visual Studio,删除ncb文件和suo文件。
打开工程,待Intellisesnce update完毕后,添加消息响应代码。屡试不爽啊! 我这么试了之后没有起任何作用,但是看到有说新建有用的public:。于是,我将一些不同类的函数放到新的public:下即可顺利解决问题,赞一个!