1 ///////////////////////////////////////
\r
5 #include "MyDialog.h"
\r
6 #include "resource.h"
\r
9 // Definitions for the CTofDialog class
\r
10 CTofDialog::CTofDialog(UINT nResID, CWnd* pParent)
\r
11 : CDialog(nResID, pParent)
\r
13 m_hInstRichEdit = ::LoadLibrary(_T("RICHED32.DLL"));
\r
14 if (!m_hInstRichEdit)
\r
15 ::MessageBox(NULL, _T("CTofDialog::CRichView Failed to load RICHED32.DLL"), _T(""), MB_ICONWARNING);
\r
18 CTofDialog::~CTofDialog()
\r
20 ::FreeLibrary(m_hInstRichEdit);
\r
23 INT_PTR CTofDialog::DialogProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
\r
27 //Additional messages to be handled go here
\r
30 // Pass unhandled messages on to parent DialogProc
\r
31 return DialogProcDefault(uMsg, wParam, lParam);
\r
34 BOOL CTofDialog::OnCommand(WPARAM wParam, LPARAM lParam)
\r
36 UNREFERENCED_PARAMETER(lParam);
\r
38 switch (LOWORD(wParam))
\r
61 } //switch (LOWORD(wParam))
\r
66 BOOL CTofDialog::OnInitDialog()
\r
69 SetIconLarge(IDW_MAIN);
\r
70 SetIconSmall(IDW_MAIN);
\r
72 // Put some text in the edit boxes
\r
73 SetDlgItemText(IDC_EDIT1, _T("Edit Control"));
\r
74 SetDlgItemText(IDC_RICHEDIT1, _T("Rich Edit Window"));
\r
76 // Put some text in the list box
\r
77 for (int i = 0 ; i < 8 ; i++)
\r
78 SendDlgItemMessage(IDC_LIST1, LB_ADDSTRING, 0, (LPARAM) _T("List Box"));
\r
83 void CTofDialog::OnOK()
\r
85 MessageBox(_T("OK Button Pressed. Program will exit now."), _T("Button"), MB_OK);
\r
89 void CTofDialog::OnButton()
\r
91 SetDlgItemText(IDC_STATIC3, _T("Button Pressed"));
\r
92 TRACE(_T("Button Pressed\n"));
\r
95 void CTofDialog::OnCheck1()
\r
97 SetDlgItemText(IDC_STATIC3, _T("Check Box 1"));
\r
98 TRACE(_T("Check Box 1\n"));
\r
101 void CTofDialog::OnCheck2()
\r
103 SetDlgItemText(IDC_STATIC3, _T("Check Box 2"));
\r
104 TRACE(_T("Check Box 2\n"));
\r
107 void CTofDialog::OnCheck3()
\r
109 SetDlgItemText(IDC_STATIC3, _T("Check Box 3"));
\r
110 TRACE(_T("Check Box 3\n"));
\r
113 void CTofDialog::OnRadio1()
\r
115 SetDlgItemText(IDC_STATIC3, _T("Radio 1"));
\r
116 TRACE(_T("Radio 1\n"));
\r
119 void CTofDialog::OnRadio2()
\r
121 SetDlgItemText(IDC_STATIC3, _T("Radio 2"));
\r
122 TRACE(_T("Radio 2\n"));
\r
125 void CTofDialog::OnRadio3()
\r
127 SetDlgItemText(IDC_STATIC3, _T("Radio 3"));
\r
128 TRACE(_T("Radio 3\n"));
\r