16,471
社区成员
发帖
与我相关
我的任务
分享
void CTwoEditDataExchangeDlg::OnEnChangeEdit1()
{
// TODO: 如果该控件是 RICHEDIT 控件,则它将不会
// 发送该通知,除非重写 CDialog::OnInitDialog()
// 函数并调用 CRichEditCtrl().SetEventMask(),
// 同时将 ENM_CHANGE 标志“或”运算到掩码中。
// TODO: 在此添加控件通知处理程序代码
CString str;
GetDlgItemText(IDC_EDIT1,str);
SetDlgItemText(IDC_EDIT2,str);
}
void CXXDlg::OnChangeEdit1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
static int i=0;
m_text2.Format(_T("%d"), i++);
GetDlgItem(IDC_EDIT2)->SetWindowText(m_text2);
}
void CXXDlg::OnChangeEdit2()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
static int i=0;
m_text.Format(_T("%d"), i++);
UpdateData(FALSE);
}