一个按钮事件里面我要调用一个自定义函数,来触发事件
这样对么 谢谢void CListDlg::OnBtnShow() //按钮事件
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
CListDlg Show;
Show.fun1(); //fun1为自定义函数, 负责edit框中显示变量
UpdateData(FALSE);}
这样对么 谢谢void CListDlg::OnBtnShow() //按钮事件
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
CListDlg Show;
Show.fun1(); //fun1为自定义函数, 负责edit框中显示变量
UpdateData(FALSE);}
{
// TODO: Add your control notification handler code here
fun();
}void CMy1Dlg::fun1()
{
CWnd *pWnd;
pWnd=this->GetDlgItem(IDC_EDIT1);
pWnd->SetWindowText("你好啊!");
}
void CMy1Dlg::OnButton1()//按钮单击事件
{
// TODO: Add your control notification handler code here
fun1();
}