"cannot add new member", 双击dialog上的button想添加函数时出现的。

shadowWind 2004-08-05 10:58:05
昨天还没事
今天就不行了

删了ncb,opt,clw文件重新打开工程还是这样。

csdn搜索引擎坏了,只好来问。
...全文
1112 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
dhbo 2004-08-05
  • 打赏
  • 举报
回复
删除了系统生成得注释。自己手动加吧
holyeagle 2004-08-05
  • 打赏
  • 举报
回复
是不是删除了头文件里面被mark掉的那几个宏,如
//{{AFX_MSG(CFocusDlg)
huaboy408 2004-08-05
  • 打赏
  • 举报
回复
Read-only source files ? Go into class wizard and add a member from
there, if the button is greyed-out, then they're read-only :)

If it's not that, then you've messed-up with copying/pasting and
you've not changed the class definitions in comments around the bits
where the wizard uses.
shadowWind 2004-08-05
  • 打赏
  • 举报
回复
很好解决是怎么解决?
我不知道阿
DentistryDoctor 2004-08-05
  • 打赏
  • 举报
回复
这不好说,这种问题在现在应该很好解决的。
极深研几 2004-08-05
  • 打赏
  • 举报
回复
Read-only source files ? Go into class wizard and add a member from
there, if the button is greyed-out, then they're read-only :)

If it's not that, then you've messed-up with copying/pasting and
you've not changed the class definitions in comments around the bits
where the wizard uses.

解释一下:
classwizard通过clw来记录一些,重要的信息如类名称等,但是真正纪录宏,消息响应函数的东西是在源代码前后(如消息响应函数)的注释,往往是成对出现的,他们为classwizard所用。这一类问题原因在于不小心(或偶然的)改动了这些信息。按你说的情况,应该在消息宏,消息函数声明,DDX宏前后寻找错误。这些东西可以手工改动!
shadowWind 2004-08-05
  • 打赏
  • 举报
回复
刚才通过classwizard可以添加我要的函数
不过问题还是存在

不知道怎么造成的
lixiaosan 2004-08-05
  • 打赏
  • 举报
回复
是否删除控件后,又添加控件,又修改控件ID,其中又给控件添加消息函数,关联了变量等等


会造成这种问题。。


在代码里改。同时可能要手动修改rc文件
kpld8888 2004-08-05
  • 打赏
  • 举报
回复
把和此对话框相关的类删去呢?

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧