📄 wuzhou11dlg.cpp
字号:
}
void CWuzhou11Dlg::OnChangeEdit4()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
tmp4=(int)GetDlgItemInt(IDC_EDIT4);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit5()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
tmp5=(int)GetDlgItemInt(IDC_EDIT5);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit6()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT6,buffer,30);
tmp6=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit7()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT7,buffer,30);
tmp7=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit8()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT8,buffer,30);
tmp8=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit9()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT9,buffer,30);
tmp9=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit10()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT10,buffer,30);
tmp10=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit11()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT11,buffer,30);
tmp11=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit12()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT12,buffer,30);
tmp12=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit13()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT13,buffer,30);
tmp13=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit14()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT14,buffer,30);
tmp14=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit15()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT15,buffer,30);
tmp15=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit16()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT16,buffer,30);
tmp16=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit17()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT17,buffer,30);
tmp17=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit18()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT18,buffer,30);
tmp18=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit19()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT19,buffer,30);
tmp19=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit20()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT20,buffer,30);
tmp20=atof(buffer);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit21()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT21,file1,50);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnChangeEdit22()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
GetDlgItemText(IDC_EDIT22,yy,5);
// TODO: Add your control notification handler code here
}
void CWuzhou11Dlg::OnOK()
{
// TODO: Add extra validation here
// gcvt(tmp6,7,buffer);
// SetDlgItemText(IDC_EDIT7,buffer);
str(file1);
FILE *f1;
if((f1=fopen(name2,"w+"))==NULL)
{
printf("没有打开文件!\n");
exit(0);
}
else
{
// yy='y';
// fprintf(file1,"%s\n %s\n",name,yy);
fprintf(f1,"%10d%10d%10d%10d%10d\n",tmp1,tmp2,tmp3,tmp4,tmp5);
//
fprintf(f1,"%5.2f%5.2f%5.2f%5.2f%5.2f\n",tmp6,tmp7,tmp8,tmp9,tmp10);
fprintf(f1,"%5.2f%5.2f%5.2f%5.2f%5.2f\n",tmp11,tmp12,tmp13,tmp14,tmp15);
fprintf(f1,"%5.2f%5.2f%5.2f%5.2f%5.2f\n",tmp16,tmp17,tmp18,tmp19,tmp20);
}
fclose(f1);
//
// CDialog::OnOK();
}
void CWuzhou11Dlg::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
void CWuzhou11Dlg::OnButton1()
{
// TODO: Add your control notification handler code here
LearnDlg learn;
strcpy(learn.file0,file0);
strcpy(learn.file00,file00);
strcpy(learn.file1,file1);
strcpy(learn.file2,file2);
strcpy(learn.file3,file3);
strcpy(learn.file4,file4);
strcpy(learn.file5,file5);
strcpy(learn.file6,file6);
strcpy(learn.file7,file7);
strcpy(learn.file8,file8);
strcpy(learn.file9,file9);
strcpy(learn.name1,name1);
strcpy(learn.name2,name2);
strcpy(learn.name3,name3);
strcpy(learn.yy,yy);
if(learn.DoModal()==IDOK)
{
// str(file1);
// strcpy(learn.file000,file1);
// application();
;
}
}
void CWuzhou11Dlg::OnButton2()
{
// TODO: Add your control notification handler code here
ForecastDlg forecast;
strcpy(forecast.file0,file0);
strcpy(forecast.file00,file00);
strcpy(forecast.file1,file1);
strcpy(forecast.file2,file2);
strcpy(forecast.file3,file3);
strcpy(forecast.file4,file4);
strcpy(forecast.file5,file5);
strcpy(forecast.file6,file6);
strcpy(forecast.file7,file7);
strcpy(forecast.file8,file8);
strcpy(forecast.file9,file9);
strcpy(forecast.name1,name1);
strcpy(forecast.name2,name2);
strcpy(forecast.name3,name3);
if(forecast.DoModal()==IDOK)
{
// application();
;
}
}
HBRUSH CWuzhou11Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired
return hbr;
}
void CWuzhou11Dlg::OnCancelMode()
{
CDialog::OnCancelMode();
// TODO: Add your message handler code here
}
void CWuzhou11Dlg::OnButton4()
{
// TODO: Add your control notification handler code here
str(file1);
FILE *f3;
if((f3=fopen(name2,"r+"))==NULL)
{
// strcpy(name,aa);
// strcpy(yy,yynn);
f3=fopen(name2,"w+");
// fprintf(file2,"%s\n %c\n",name,yy);
fprintf(f3,"%10d%10d%10d%10d%10d\n",xx1,xx2,xx3,xx4,xx5);
fprintf(f3,"%5.2f%5.2f%5.2f%5.2f%5.2f\n",xx6,xx7,xx8,xx9,xx10);
fprintf(f3,"%5.2f%5.2f%5.2f%5.2f%5.2f\n",xx11,xx12,xx13,xx14,xx15);
fprintf(f3,"%5.2f%5.2f%5.2f%5.2f%5.2f\n",xx16,xx17,xx18,xx19,xx20);
// printf("没有打开文件!\n");
// exit(0);
}
else
{
// strcpy(name,aa);
// strcpy(yy,yynn);
// yy[]={"y"};
// fscanf(file2,"%s",name);
// fscanf(file2,"%s",yy);
fscanf(f3,"%d%d%d%d%d",&xx1,&xx2,&xx3,&xx4,&xx5);
fscanf(f3,"%f%f%f%f%f",&xx6,&xx7,&xx8,&xx9,&xx10);
fscanf(f3,"%f%f%f%f%f",&xx11,&xx12,&xx13,&xx14,&xx15);
fscanf(f3,"%f%f%f%f%f",&xx16,&xx17,&xx18,&xx19,&xx20);
//
}
fclose(f3);
//
//
SetDlgItemInt(IDC_EDIT1,xx1,TRUE);
SetDlgItemInt(IDC_EDIT2,xx2,TRUE);
SetDlgItemInt(IDC_EDIT3,xx3,TRUE);
SetDlgItemInt(IDC_EDIT4,xx4,TRUE);
SetDlgItemInt(IDC_EDIT5,xx5,TRUE);
//
gcvt(xx6,7,buffer);
SetDlgItemText(IDC_EDIT6,buffer);
gcvt(xx7,7,buffer);
SetDlgItemText(IDC_EDIT7,buffer);
gcvt(xx8,7,buffer);
SetDlgItemText(IDC_EDIT8,buffer);
gcvt(xx9,7,buffer);
SetDlgItemText(IDC_EDIT9,buffer);
gcvt(xx10,7,buffer);
SetDlgItemText(IDC_EDIT10,buffer);
//
gcvt(xx11,7,buffer);
SetDlgItemText(IDC_EDIT11,buffer);
gcvt(xx12,7,buffer);
SetDlgItemText(IDC_EDIT12,buffer);
gcvt(xx13,7,buffer);
SetDlgItemText(IDC_EDIT13,buffer);
gcvt(xx14,7,buffer);
SetDlgItemText(IDC_EDIT14,buffer);
gcvt(xx15,7,buffer);
SetDlgItemText(IDC_EDIT15,buffer);
//
gcvt(xx16,7,buffer);
SetDlgItemText(IDC_EDIT16,buffer);
gcvt(xx17,7,buffer);
SetDlgItemText(IDC_EDIT17,buffer);
gcvt(xx18,7,buffer);
SetDlgItemText(IDC_EDIT18,buffer);
gcvt(xx19,7,buffer);
SetDlgItemText(IDC_EDIT19,buffer);
gcvt(xx20,7,buffer);
SetDlgItemText(IDC_EDIT20,buffer);
//
SetDlgItemText(IDC_EDIT21,file0);
SetDlgItemText(IDC_EDIT22,yy);
//
//
}
void CWuzhou11Dlg::OnButton5()
{
// TODO: Add your control notification handler code here
// CDialog::OnCancelMode();
}
void CWuzhou11Dlg::str(char *file)
{
//
strcpy(file0,file1);
strcpy(file00,file1);
strcpy(file3,strcpy(file2,file1));
strcpy(file5,strcpy(file4,file1));
strcpy(file7,strcpy(file6,file1));
strcpy(file9,strcpy(file8,file1));
strcpy(name2,strcpy(name1,file1));
strcpy(name3,file1);
//
strcat(file1,file10);
strcat(file2,file20);
strcat(file3,file30);
strcat(file4,file40);
strcat(file5,file50);
strcat(file6,file60);
strcat(file7,file70);
strcat(file8,file80);
strcat(file9,file90);
strcat(name1,name10);
strcat(name2,name20);
strcat(name3,name30);
return;
//
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -