// Information.cpp : implementation file // #include "stdafx.h" #include "Perfstat_UI_Final.h" #include "Information.h" #include "afxdialogex.h" // CInformation dialog IMPLEMENT_DYNAMIC(CInformation, CDialogEx) CInformation::CInformation(CWnd* pParent /*=NULL*/) : CDialogEx(CInformation::IDD, pParent) { m_strEdit = _T(""); } CInformation::~CInformation() { } void CInformation::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); DDX_Control(pDX, IDC_EDIT_INFORMATION, m_editInformation); DDX_Control(pDX, IDC_STATIC_INFO, m_staticMsg); } BEGIN_MESSAGE_MAP(CInformation, CDialogEx) ON_EN_CHANGE(IDC_EDIT_INFORMATION, &CInformation::OnEnChangeEditInformation) ON_BN_CLICKED(IDOK, &CInformation::OnBnClickedOk) END_MESSAGE_MAP() // CInformation message handlers void CInformation::OnEnChangeEditInformation() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialogEx::OnInitDialog() // function and call CRichEditCtrl().SetEventMask() // with the ENM_CHANGE flag ORed into the mask. // TODO: Add your control notification handler code here CString str; GetDlgItemText(IDC_EDIT_INFORMATION, str); m_strEdit = str; } CString CInformation :: GetText() const { return m_strEdit; } void CInformation::SetPromptMsg(PROMPT_MESSAGES msg) { m_promptMsg = msg; } void CInformation::OnBnClickedOk() { // TODO: Add your control notification handler code here CDialogEx::OnOK(); } BOOL CInformation::OnInitDialog() { CDialogEx::OnInitDialog(); // TODO: Add extra initialization here if(m_promptMsg == PROMPT_SSH_PASSPHRASE) { SetDlgItemTextW(IDC_STATIC_INFO, _T("Enter SSH PassPhrase")); UpdateData(TRUE); } else if(PROMPT_SSH_PASSPHRASE_REPEAT == m_promptMsg) { SetDlgItemTextW(IDC_STATIC_INFO, _T("Re-Enter SSH PassPhrase")); UpdateData(TRUE); } else { } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }