summaryrefslogtreecommitdiffabout
path: root/CalleeDlg.cpp
authorMichael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
committer Michael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
commit955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (side-by-side diff)
tree92493a2c9ac206b822e24a9e5a6f6b1589be6afb /CalleeDlg.cpp
downloadT42-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
Diffstat (limited to 'CalleeDlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--CalleeDlg.cpp89
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 @@
+// CalleeDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "T42.h"
+#include "CalleeDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CCalleeDlg dialog
+
+
+CCalleeDlg::CCalleeDlg(CWnd* pParent /*=NULL*/)
+ : CDialog(CCalleeDlg::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CCalleeDlg)
+ m_Callee = _T("");
+ m_Caller = _T("");
+ m_TTY = _T("");
+ //}}AFX_DATA_INIT
+}
+
+
+void CCalleeDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CCalleeDlg)
+ DDX_Control(pDX, IDC_CALLER, m_CallerCtl);
+ DDX_Control(pDX, IDC_CALLEE, m_CalleeCtl);
+ DDX_Text(pDX, IDC_CALLEE, m_Callee);
+ DDX_CBString(pDX, IDC_CALLER, m_Caller);
+ DDV_MaxChars(pDX, m_Caller, 11);
+ DDX_CBString(pDX, IDC_TTY, m_TTY);
+ DDV_MaxChars(pDX, m_TTY, 15);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CCalleeDlg, CDialog)
+ //{{AFX_MSG_MAP(CCalleeDlg)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CCalleeDlg message handlers
+
+BOOL CCalleeDlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+CT42App* app = (CT42App*)AfxGetApp();
+ ASSERT(app);
+POSITION p = app->m_t42Callees.GetHeadPosition();
+ m_CalleeCtl.ResetContent();
+ while(p){
+ CString callee = app->m_t42Callees.GetNext(p);
+ m_CalleeCtl.AddString(callee);
+ if(m_Callee.IsEmpty())
+ m_Callee = callee;
+ }
+ m_CallerCtl.ResetContent();
+ p = app->m_t42Callers.GetHeadPosition();
+ while(p){
+ CString caller = app->m_t42Callers.GetNext(p);
+ m_CallerCtl.AddString(caller);
+ if(m_Caller.IsEmpty())
+ m_Caller = caller;
+ }
+ UpdateData(FALSE);
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CCalleeDlg::OnOK()
+{
+ UpdateData(TRUE);
+ if(m_Caller.IsEmpty())
+ VERIFY(m_Caller.LoadString(IDS_DEFAULTCALLER));
+CT42App* app = (CT42App*)AfxGetApp();
+ ASSERT(app);
+ app->LastCaller(m_Caller);
+ CDialog::OnOK();
+}