nterpret_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 ();
}
} CCourseDlg :: OnQueryDragIcon ()
{static_cast (m_hIcon);
} CCourseDlg :: OnBnClickedButton1 ()
{:: ifstream file ("1. data", std :: ios :: in); (! file)
{("Помилка! Не найден файл 1. data"); ();
}. m_question = readStringFromFile (file). c_str ();. m_answer1. SetWindowTextA (readStringFromFile (file). C_str ());. m_answer2. SetWindowTextA (readStringFromFile (file). C_str ());. m_answer3. SetWindowTextA (readStringFromFile (file). C_str ());. m_answer4. SetWindowTextA (readStringFromFile (file). C_str ());. UpdateData (false); _button. ShowWindow (SW_HIDE); _button2. ShowWindow (SW_SHOW);
:: ShowWindow (m_browser. GetSafeHwnd (), SW_HIDE);. ShowWindow (SW_SHOW);. close ();
} :: string CCourseDlg :: readStringFromFile (std :: ifstream & file)
{:: string data, buf; (! file. eof ())
{>> buf; (buf == "% |"); + = buf + "";
} data;
} CCourseDlg :: OnBnClickedButton2 ()
{. UpdateData (true); :: string path; (count)
{1: = "2. data ";; 2: =" 3. data ";; 3: =" 4. data ";; 4: =" 5. data ";; 5: =" 4. data ";
} :: ifstream file (path. c_str (), std :: ios :: in); (! file)
{("Помилка! Не найден файл"); ();
} (count)
{1: (! test. m_answer4. GetCheck ())
{= false;
} + +;. m_question = readStringFromFile (file). c_str ();. m_answer1. SetWindowTextA (readStringFromFile (file). C_str ());. m_answer2. SetWindowTextA (readStringFromFile (file). C_str ());. m_answer3. SetWindowTextA (readStringFromFile (file). C_str ());. m_answer4. SetWindowTextA (readStringFromFile (file). C_str ());. UpdateData (false);; 2: (! Test. M_answer2. GetCheck ())
{= false;
} + +;. m_answer1. ShowWindow (SW_HIDE);. m_answer2. ShowWindow (SW_HIDE);. m_answer3. ShowWindow (SW_HIDE);. m_answer4. ShowWindow (SW_HIDE);. m_ch_answer1. ShowWindow (SW_SHOW);. m_ch_answer2. ShowWindow (SW_SHOW);. m_ch_answer3. ShowWindow (SW_SHOW);. m_ch_answer4. ShowWindow (SW_SHOW);. m_question = readStringFromFile (file). c_str ();. m_ch_answer1. SetWindowTextA (readStringFromFile (file). C...