n>
. Крупник А.Б. Вивчаємо С + +. - СПб.: Пітер, 2004. - 254 c.
Додаток 1. Програмні коди
НАВЧАЛЬНА ПРОГРАМА
// CourseDlg. cpp
////////////////////////
# include "stdafx. h "
# include "Course. h "
# include "CourseDlg. h "
# ifdef _DEBUG
# define new DEBUG_NEW
# endif :: CCourseDlg (CWnd * pParent/* = NULL * /)
: CDialog (CCourseDlg :: IDD, pParent)
, m_edit_value (_T (""))
{_hIcon = AfxGetApp () -> LoadIcon (IDR_MAINFRAME); = true; = 1;
} CCourseDlg :: DoDataExchange (CDataExchange * pDX)
{:: DoDataExchange (pDX); _Control (pDX, IDC_EXPLORER1, m_browser); _Control (pDX, IDC_BUTTON1, m_button); _Control (pDX, IDC_BUTTON2, m_button2); _Control (pDX, IDC_BUTTON3, m_button3 ); _Control (pDX, IDC_STATIC8, m_static); _Control (pDX, IDC_EDIT1, m_edit); _Text (pDX, IDC_EDIT1, m_edit_value);
} _MESSAGE_MAP (CCourseDlg, CDialog) _WM_PAINT () _WM_QUERYDRAGICON ()
//}} AFX_MSG_MAP_BN_CLICKED (IDC_BUTTON1, & CCourseDlg :: OnBnClickedButton1) _BN_CLICKED (IDC_BUTTON2, & CCourseDlg :: OnBnClickedButton2) _BN_CLICKED (IDC_BUTTON3, & CCourseDlg :: OnBnClickedButton3) _MESSAGE_MAP () CCourseDlg: : OnInitDialog ()
{:: OnInitDialog (); (m_hIcon, TRUE);// Set big icon (m_hIcon, FALSE);// Set small icon
// TODO: Add extra initialization here. CreateFontA (
,// ​​nHeight
,// ​​nWidth
,// ​​nEscapement
,// ​​nOrientation_NORMAL,// ​​nWeight,// ​​bItalic,// ​​bUnderline
,// ​​cStrikeOut_CHARSET,// ​​nCharSet_DEFAULT_PRECIS,// ​​nOutPrecision_DEFAULT_PRECIS,// ​​nClipPrecision_QUALITY,// ​​nQuality_PITCH | FF_SWISS,// ​​nPitchAndFamily
"Tahoma"); _static. SetFont (& font);. Create (IDD_FORMVIEW, this);. m_answer1. SetFont (& font);. m_answer2. SetFont (& font);. m_answer3. SetFont (& font);. m_answer4. SetFont (& font);. m_ch_answer1. SetFont (& font);. m_ch_answer2. SetFont (& font);. m_ch_answer3. SetFont (& font);. m_ch_answer4. SetFont (& font); _button2. ShowWindow (SW_HIDE); _browser. Navigate (_T ("file:// localhost/D:/Studio/project/Course/Course/1.html"), 0,0,0,0); TRUE;// return TRUE unless you set the focus to a control
} CCourseDlg :: OnPaint ()
{(IsIconic ())
{dc (this);// device context for painting (WM_ICONERASEBKGND, rei...