switch(id)
{
case IDC_1:
{TCHAR str1[256];
TCHAR str2[256];
GetDlgItemText(hwnd,IDC_EDIT1,str1,sizeof(str1));
GetDlgItemText(hwnd,IDC_EDIT2,str2,sizeof(str2));
double i1=atof(str1);
double i2=atof(str2);
double d;
d=i1+i2;
TCHAR str3[256];
//itoa(i3,str3,8);
swprintf(str3,"%f",d);
SetDlgItemText(hwnd,IDC_EDIT3,str3);
}break;
哪错了
|