初学者求问error C2065: 'MessageBOX' : undeclared identifier
mfc吧
全部回复
仅看楼主
level 1
渣渣isyou 楼主
CString str;//定义MFC的字符串对象
GetDlgItem(IDC_EDIT1)->GetWindowText(str);//读取编辑框内容
GetDlgItem(IDC_EDIT2)->GetWindowText(str);
GetDlgItem(IDC_EDIT3)->GetWindowText(str);
GetDlgItem(IDC_EDIT4)->GetWindowText(str);
GetDlgItem(IDC_EDIT5)->GetWindowText(str);
GetDlgItem(IDC_EDIT6)->GetWindowText(str);
GetDlgItem(IDC_EDIT7)->GetWindowText(str);
GetDlgItem(IDC_EDIT8)->GetWindowText(str);
double P=atof(str) ;//字符串内容转换成浮点数
double Z=atof(str) ;
double Y=atof(str) ;
double V=atof(str) ;
double p=atof(str) ;
double z=atof(str) ;
double y=atof(str) ;
double v=atof(str) ;
double h=((P+Z*Y+V*V*Y/19.6)-(p+z*y+v*v*y/19.6)) ;//浮点数计算
str.Format("%d",(int)h);//浮点数转换为字符串
GetDlgItem(IDC_EDIT9)->GetWindowText(str);//设置编辑框内容
MessageBOX(str);//显示消息框
2020年05月09日 08点05分 1
吧务
level 10
MessageBox
2020年05月09日 09点05分 2
1