用一个结构体表示组信息,组信息包括作业编号,提交时间,运行时间
下面是编码,请问要怎么改
//录入数据按钮
void CMFCApplication2Dlg::OnBnClickedButton1()
{
counter = GetDlgItemInt(IDC_EDIT5,NULL,TRUE); //IDC_EDIT5 作业数 in1
tasks[tempcou1].number = GetDlgItemInt(IDC_EDIT6,NULL,TRUE); //IDC_EDIT6 作业编号 in3
tasks[tempcou1].come_time = float(GetDlgItemInt(IDC_EDIT7,NULL,TRUE)); //IDC_EDIT7 提交时间 in4
tasks[tempcou1]. run_time = float(GetDlgItemInt(IDC_EDIT4,NULL,TRUE)); //IDC_EDIT4 运行时间 in5
tempcou1++;
in3.Clear();//清空数据
in3.GetFocus();//再次获得焦点
in4.Clear();//清空数据
in4.GetFocus();//再次获得焦点
in5.Clear();//清空数据
in5.GetFocus();//再次获得焦点
if(tempcou1>counter)
{
MessageBox(L"录入信息超过作业数!", L"温馨提示", MB_OK|MB_ICONINFORMATION);
return;
}
// TODO: 在此添加控件通知处理程序代码
}