假设输入框ID是:ID_NUMBER1,ID_NUMBER2,ID_NUMBER3。
获取数据的方式是:
int number1,number2,number3; number1 = GetDlgItemInt(ID_NUMBER1); number2 = GetDlgItemInt(ID_NUMBER2); number3 = number1 + number2; SetDlgItemInt(ID_NUMBER3,number3);
将数据3设置在输入框三中。