你的输入只有数字?是的话:
1.设置编辑框属性为“数字”
2.单击按钮的消息响应函数中这样操作:假设你两个编辑框ID分别为IDC_EDIT1,IDC_EDIT2
CString text;
GetDlgItem(IDC_EDIT1)->GetWindowText(text);
LPTSTR pstr = (LPTSTR)(LPCTSTR)text;
while(*pstr)
{
if(*pstr <= '9' && *pstr >= '0')
*pstr += 1;
pstr++;
}
GetDlgItem(IDC_EDIT2)->SetWindowText(text);