// AddMsgDlg.cpp : implementation file // #include "stdafx.h" #include "clipf32.h" #include "AddMsgDlg.h" #include "MainFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // AddMsgDlg dialog AddMsgDlg::AddMsgDlg(CWnd* pParent /*=NULL*/) : CDialog(AddMsgDlg::IDD, pParent) { //{{AFX_DATA_INIT(AddMsgDlg) m_strMsgText = _T(""); //}}AFX_DATA_INIT } void AddMsgDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(AddMsgDlg) DDX_Text(pDX, IDC_MSG_TEXT, m_strMsgText); DDV_MaxChars(pDX, m_strMsgText, 256); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(AddMsgDlg, CDialog) //{{AFX_MSG_MAP(AddMsgDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // AddMsgDlg message handlers BOOL AddMsgDlg::OnInitDialog() { CDialog::OnInitDialog(); m_strMsgText = "LEAD Technologies, Inc."; UpdateData( FALSE ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void AddMsgDlg::OnOK() { CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->GetMainWnd(); GetDlgItemText(IDC_MSG_TEXT, m_strMsgText); if ( pFrame ) pFrame->m_strAddMsgText = m_strMsgText; CDialog::OnOK(); }