home *** CD-ROM | disk | FTP | other *** search
- // memoview.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "memo.h"
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- #include "memodoc.h"
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
- #include "memoview.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMemoView
-
- IMPLEMENT_DYNCREATE(CMemoView, CFormView)
-
- CMemoView::CMemoView()
- : CFormView(CMemoView::IDD)
- {
- //{{AFX_DATA_INIT(CMemoView)
- m_Date = "";
- m_Ref = "";
- m_From = "";
- m_To = "";
- m_Memo = "";
- //}}AFX_DATA_INIT
- }
-
- CMemoView::~CMemoView()
- {
- }
-
- void CMemoView::DoDataExchange(CDataExchange* pDX)
- {
- CFormView::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CMemoView)
- DDX_Text(pDX, IDC_DATE, m_Date);
- DDX_Text(pDX, IDC_REF, m_Ref);
- DDX_Text(pDX, IDC_FROM, m_From);
- DDX_Text(pDX, IDC_TO, m_To);
- DDX_Text(pDX, IDC_MEMO, m_Memo);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CMemoView, CFormView)
- //{{AFX_MSG_MAP(CMemoView)
- ON_EN_CHANGE(IDC_DATE, OnChangeDate)
- ON_EN_CHANGE(IDC_REF, OnChangeRef)
- ON_EN_CHANGE(IDC_FROM, OnChangeFrom)
- ON_EN_CHANGE(IDC_TO, OnChangeTo)
- ON_EN_CHANGE(IDC_MEMO, OnChangeMemo)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CMemoView message handlers
-
-
- ///////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- void CMemoView::OnInitialUpdate()
- {
-
- // Get a pointer to the document.
- CMemoDoc* pDoc = (CMemoDoc*) GetDocument();
-
- // Update the data members of the view class with the
- // current values of the data members of document class.
- m_Date = pDoc->m_Date;
- m_Ref = pDoc->m_Ref;
- m_From = pDoc->m_From;
- m_To = pDoc->m_To;
- m_Memo = pDoc->m_Memo;
-
- // Update the screen with the new values of the variables.
- UpdateData(FALSE);
-
- }
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- void CMemoView::OnChangeDate()
- {
- // TODO: Add your control notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Update the variables of the controls with the current
- // values inside the controls.
- UpdateData(TRUE);
-
- // Get a pointer to the document.
- CMemoDoc* pDoc = (CMemoDoc*) GetDocument();
-
- // Update the m_Date data member of the document class.
- pDoc->m_Date = m_Date;
-
- // Set the Modified flag of the document class to TRUE.
- pDoc->SetModifiedFlag();
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-
- void CMemoView::OnChangeRef()
- {
- // TODO: Add your control notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Update the variables of the controls with the current
- // values inside the controls.
- UpdateData(TRUE);
-
- // Get a pointer to the document.
- CMemoDoc* pDoc = (CMemoDoc*) GetDocument();
-
- // Update the m_Ref data member of the document class.
- pDoc->m_Ref = m_Ref;
-
- // Set the Modified flag of the document class to TRUE.
- pDoc->SetModifiedFlag();
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
- }
-
- void CMemoView::OnChangeFrom()
- {
- // TODO: Add your control notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Update the variables of the controls with the current
- // values inside the controls.
- UpdateData(TRUE);
-
- // Get a pointer to the document.
- CMemoDoc* pDoc = (CMemoDoc*) GetDocument();
-
- // Update the m_From data member of the document class.
- pDoc->m_From = m_From;
-
- // Set the Modified flag of the document class to TRUE.
- pDoc->SetModifiedFlag();
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-
- void CMemoView::OnChangeTo()
- {
- // TODO: Add your control notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Update the variables of the controls with the current
- // values inside the controls.
- UpdateData(TRUE);
-
- // Get a pointer to the document.
- CMemoDoc* pDoc = (CMemoDoc*) GetDocument();
-
- // Update the m_To data member of the document class.
- pDoc->m_To = m_To;
-
- // Set the Modified flag of the document class to TRUE.
- pDoc->SetModifiedFlag();
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
- }
-
- void CMemoView::OnChangeMemo()
- {
- // TODO: Add your control notification handler code here
-
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Update the variables of the controls with the current
- // values inside the controls.
- UpdateData(TRUE);
-
- // Get a pointer to the document.
- CMemoDoc* pDoc = (CMemoDoc*) GetDocument();
-
- // Update the m_Memo data member of the document class.
- pDoc->m_Memo = m_Memo;
-
- // Set the Modified flag of the document class to TRUE.
- pDoc->SetModifiedFlag();
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
- }
-