当你在给一个MFC类添加消息响应的时候,遇到过这样的问题吗? 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完毕后,添加消息响应代码。屡试不爽啊!