"cannot add new member"解决方法
2011-04-28 16:16
323 查看
今天在添加控件的时候弹出这样的问题,在网上找了一下相关的解决方法,最常见的莫过于:1.:如果出现这种情况,我们可以先把工程给关闭,然后删除 *.clw文件,然后再打开工程,并按CTRL+W打开ClassWizard,这里我们输入先前删除的文件的文件名,然后点确定,便可重新生成一次*.clw文件。(注意:这里的*代码你的工程,如:我的工程叫Test,那么我们就应该删除Test.clw文件),这里如果顺序的进行ClassWizard页面的话,那么上面的问题上就解决了。
我尝试了上面的方法,依然没有解决问题,没办法,只能在程序中自己手动添加代码了,具体方法如下:
1,在BEGIN_MESSAGE_MAP()下加入 ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
前者为控件ID后者为函数名;
2,在同文件的类的
protected:
// Generated message map functions
//{{AFX_MSG(CSelecteDlg)
下面添加:
afx_msg void OnButton1();
3,在源文件中加入:
void 类::OnButton1()
{
...
}
我尝试了上面的方法,依然没有解决问题,没办法,只能在程序中自己手动添加代码了,具体方法如下:
1,在BEGIN_MESSAGE_MAP()下加入 ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
前者为控件ID后者为函数名;
2,在同文件的类的
protected:
// Generated message map functions
//{{AFX_MSG(CSelecteDlg)
下面添加:
afx_msg void OnButton1();
3,在源文件中加入:
void 类::OnButton1()
{
...
}
相关文章推荐
- 右击 对话框资源 事件,提示cannot add new member的解决方法
- 编程技巧之:双击VC对话框提示cannot add new member以及类向导中没有已经建立的类的解决方法
- 双击VC对话框提示cannot add new member的解决方法
- 双击VC对话框提示cannot add new member的解决方法
- 双击VC对话框提示cannot add new member的解决方法
- VC++中,提示cannot add new member的解决方法
- cannot add new member的解决方法
- 双击VC对话框提示cannot add new member的解决方法
- VC++中,提示cannot add new member的解决方法
- VC++中,提示cannot add new member的解决方法
- Android ndk cannot locate symbol "atof" referenced by的解决方法
- nodejs Cannot find module"...\.js" 解决方法
- "XX cannot be resolved to a type "eclipse报错及解决说明
- 解决"链接服务器 '(null)' 的 OLE DB 访问接口 'STREAM' 返回了对列 '[!BulkInsert].fieldname' 无效的数据"的一种替换方法
- Stuts2的"struts.devMode"设置成true后,不起作用的解决的方法
- 一个在SSAS中的"The attribute key cannot be found" Error处理方法
- "无法保存;正被别的用户锁定"的错误的解决方法
- "table" is not mapped 解决方法
- 在VMware上编译linux内核出现VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) 错误的解决方法
- "超时时间已到。在操作完成之前超时时间已过或服务器未响应"的解决方法