16,551
社区成员
发帖
与我相关
我的任务
分享
CString str1, str2, str3;
GetDlgItem(IDC_EDIT1)->GetWindowText(str1);
GetDlgItem(IDC_EDIT2)->GetWindowText(str2);
int n1 = atoi(str1);
int n2 = atoi(str2);
n1 += n2;
str3.Format("%d", n1);
GetDlgItem(IDC_EDIT3)->SetWindowText(str3);