Приложение, написанное на Microsoft Visual C++ с использованием библиотеки MFC. Тестирование по разделу "Квадратные уравнения"
Дипломная работа - Компьютеры, программирование
Другие дипломы по предмету Компьютеры, программирование
quot;))
, r (0)
{_hIcon = AfxGetApp () - >LoadIcon (IDR_MAINFRAME);
}CTestirovanieDlg:: DoDataExchange (CDataExchange* pDX)
{:: DoDataExchange (pDX);_Text (pDX, IDC_EDIT1, tekst);
}_MESSAGE_MAP (CTestirovanieDlg, CDialog)_WM_SYSCOMMAND ()_WM_PAINT ()_WM_QUERYDRAGICON ()
// }}AFX_MSG_MAP_BN_CLICKED (IDC_BUTTON1, &CTestirovanieDlg:: OnBnClickedButton1)_BN_CLICKED (IDC_BUTTON3, &CTestirovanieDlg:: OnBnClickedButton3)_MESSAGE_MAP ()
// CTestirovanieDlg message handlersCTestirovanieDlg:: OnInitDialog ()
{:: OnInitDialog ();
// Add "About." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.( (IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);(IDM_ABOUTBOX < 0xF000);* pSysMenu = GetSystemMenu (FALSE);(pSysMenu! = NULL)
{strAboutMenu;. LoadString (IDS_ABOUTBOX);(! strAboutMenu. IsEmpty ())
{>AppendMenu (MF_SEPARATOR);>AppendMenu (MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog(m_hIcon, TRUE); // Set big icon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization hereTRUE; // return TRUE unless you set the focus to a control
}CTestirovanieDlg:: OnSysCommand (UINT nID, LPARAM lParam)
{( (nID & 0xFFF0) == IDM_ABOUTBOX)
{dlgAbout;. DoModal ();
}
{:: OnSysCommand (nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.CTestirovanieDlg:: OnPaint ()
{(IsIconic ())
{dc (this); // device context for painting(WM_ICONERASEBKGND, reinterpret_cast (dc. GetSafeHdc ()), 0);
// Center icon in client rectanglecxIcon = GetSystemMetrics (SM_CXICON);cyIcon = GetSystemMetrics (SM_CYICON);rect;(&rect);x = (rect. Width () - cxIcon + 1) / 2;y = (rect. Height () - cyIcon + 1) / 2;
// Draw the icon. DrawIcon (x, y, m_hIcon);
}
{:: OnPaint ();
}
}
// The system calls this function to obtain the cursor to display while the user drags
// the minimized window.CTestirovanieDlg:: OnQueryDragIcon ()
{static_cast (m_hIcon);
}CTestirovanieDlg:: OnBnClickedButton1 ()
{=0;dlg1;(dlg1. DoModal () ==IDOK)
{+=dlg1. o1;
}dlg2;(dlg2. DoModal () ==IDOK)
{
{(dlg2. c1==TRUE)
{+=0;
}(dlg2. c2==TRUE)
{+=3;
}(dlg2. c3==TRUE)
{+=0;
}(dlg2. c4==TRUE)
{+=3;
}
}
}dlg3;(dlg3. DoModal () ==IDOK)
{+=dlg3. o1;
}dlg4;(dlg4. DoModal () ==IDOK)
{+=dlg4. o1;
}dlg5;(dlg5. DoModal () ==IDOK)
{+=dlg5. o1;
}dlg6;(dlg6. DoModal () ==IDOK)
{+=dlg6. o1;
}dlg7;(dlg7. DoModal () ==IDOK)
{+=dlg7. o1;
}dlg8;(dlg8. DoModal () ==IDOK)
{+=dlg8. o1;
}dlg9;(dlg9. DoModal () ==IDOK)
{+=dlg9. o1;
}dlg10;(dlg10. DoModal () ==IDOK)
{
{(dlg10. c1==TRUE)
{+=3;
}(dlg10. c2==TRUE)
{+=0;
}(dlg10. c3==TRUE)
{+=0;
}(dlg10. c4==TRUE)
{+=3;
}
}
}dlg11;(dlg11. DoModal () ==IDOK)
{+=dlg11. o1;
}dlg12;(dlg12. DoModal () ==IDOK)
{+=dlg12. o1;
}dlg13;(dlg13. DoModal () ==IDOK)
{+=dlg13. o1;
}dlg14;(dlg14. DoModal () ==IDOK)
{+=dlg14. o1;
}dl15;(dl15. DoModal () ==IDOK)
{
{(dl15. c1==TRUE)
{+=0;
}(dl15. c2==TRUE)
{+=3;
}(dl15. c3==TRUE)
{+=3;
}(dl15. c4==TRUE)
{+=0;
}
}
}dlg16;(dlg16. DoModal () ==IDOK)
{+=dlg16. o1;
}dl17;(dl17. DoModal () ==IDOK)
{+=dl17. o1;
}dl18;(dl18. DoModal () ==IDOK)
{+=dl18. o1;
}dlg19;(dlg19. DoModal () ==IDOK)
{+=dlg19. o1;
}d20;(d20. DoModal () ==IDOK)
{+=d20. o1;
}. Format (L" набранно баллов: %d",r);(false);
// TODO: Add your control notification handler code here
}CTestirovanieDlg:: OnBnClickedButton3 ()
{dlghelp;(dlghelp. DoModal () ==IDOK);
// TODO: Add your control notification handler code here
}