author | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
commit | 955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (unidiff) | |
tree | 92493a2c9ac206b822e24a9e5a6f6b1589be6afb /CalleeDlg.cpp | |
download | T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.zip T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.gz T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.bz2 |
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/T42/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | CalleeDlg.cpp | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/CalleeDlg.cpp b/CalleeDlg.cpp new file mode 100644 index 0000000..971781e --- a/dev/null +++ b/CalleeDlg.cpp | |||
@@ -0,0 +1,89 @@ | |||
1 | // CalleeDlg.cpp : implementation file | ||
2 | // | ||
3 | |||
4 | #include "stdafx.h" | ||
5 | #include "T42.h" | ||
6 | #include "CalleeDlg.h" | ||
7 | |||
8 | #ifdef _DEBUG | ||
9 | #define new DEBUG_NEW | ||
10 | #undef THIS_FILE | ||
11 | static char THIS_FILE[] = __FILE__; | ||
12 | #endif | ||
13 | |||
14 | ///////////////////////////////////////////////////////////////////////////// | ||
15 | // CCalleeDlg dialog | ||
16 | |||
17 | |||
18 | CCalleeDlg::CCalleeDlg(CWnd* pParent /*=NULL*/) | ||
19 | : CDialog(CCalleeDlg::IDD, pParent) | ||
20 | { | ||
21 | //{{AFX_DATA_INIT(CCalleeDlg) | ||
22 | m_Callee = _T(""); | ||
23 | m_Caller = _T(""); | ||
24 | m_TTY = _T(""); | ||
25 | //}}AFX_DATA_INIT | ||
26 | } | ||
27 | |||
28 | |||
29 | void CCalleeDlg::DoDataExchange(CDataExchange* pDX) | ||
30 | { | ||
31 | CDialog::DoDataExchange(pDX); | ||
32 | //{{AFX_DATA_MAP(CCalleeDlg) | ||
33 | DDX_Control(pDX, IDC_CALLER, m_CallerCtl); | ||
34 | DDX_Control(pDX, IDC_CALLEE, m_CalleeCtl); | ||
35 | DDX_Text(pDX, IDC_CALLEE, m_Callee); | ||
36 | DDX_CBString(pDX, IDC_CALLER, m_Caller); | ||
37 | DDV_MaxChars(pDX, m_Caller, 11); | ||
38 | DDX_CBString(pDX, IDC_TTY, m_TTY); | ||
39 | DDV_MaxChars(pDX, m_TTY, 15); | ||
40 | //}}AFX_DATA_MAP | ||
41 | } | ||
42 | |||
43 | |||
44 | BEGIN_MESSAGE_MAP(CCalleeDlg, CDialog) | ||
45 | //{{AFX_MSG_MAP(CCalleeDlg) | ||
46 | //}}AFX_MSG_MAP | ||
47 | END_MESSAGE_MAP() | ||
48 | |||
49 | ///////////////////////////////////////////////////////////////////////////// | ||
50 | // CCalleeDlg message handlers | ||
51 | |||
52 | BOOL CCalleeDlg::OnInitDialog() | ||
53 | { | ||
54 | CDialog::OnInitDialog(); | ||
55 | |||
56 | CT42App* app = (CT42App*)AfxGetApp(); | ||
57 | ASSERT(app); | ||
58 | POSITION p = app->m_t42Callees.GetHeadPosition(); | ||
59 | m_CalleeCtl.ResetContent(); | ||
60 | while(p){ | ||
61 | CString callee = app->m_t42Callees.GetNext(p); | ||
62 | m_CalleeCtl.AddString(callee); | ||
63 | if(m_Callee.IsEmpty()) | ||
64 | m_Callee = callee; | ||
65 | } | ||
66 | m_CallerCtl.ResetContent(); | ||
67 | p = app->m_t42Callers.GetHeadPosition(); | ||
68 | while(p){ | ||
69 | CString caller = app->m_t42Callers.GetNext(p); | ||
70 | m_CallerCtl.AddString(caller); | ||
71 | if(m_Caller.IsEmpty()) | ||
72 | m_Caller = caller; | ||
73 | } | ||
74 | UpdateData(FALSE); | ||
75 | |||
76 | return TRUE; // return TRUE unless you set the focus to a control | ||
77 | // EXCEPTION: OCX Property Pages should return FALSE | ||
78 | } | ||
79 | |||
80 | void CCalleeDlg::OnOK() | ||
81 | { | ||
82 | UpdateData(TRUE); | ||
83 | if(m_Caller.IsEmpty()) | ||
84 | VERIFY(m_Caller.LoadString(IDS_DEFAULTCALLER)); | ||
85 | CT42App* app = (CT42App*)AfxGetApp(); | ||
86 | ASSERT(app); | ||
87 | app->LastCaller(m_Caller); | ||
88 | CDialog::OnOK(); | ||
89 | } | ||