/LeaderGenerator/LeaderGenerator/aboutdlg.cpp
http://leadersgenerator.codeplex.com · C++ · 71 lines · 59 code · 8 blank · 4 comment · 0 complexity · 84ffbf4a3f4050364ce5f565923dbe87 MD5 · raw file
- #include "stdafx.h"
- #include "aboutdlg.h"
-
-
- CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
- , m_sVersion(_T(""))
- , m_sCopyright(_T(""))
- {
- m_hIcon = AfxGetApp()->LoadIcon(IDI_ICON_MAINFRAME);
-
- }
-
- void CAboutDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_STATIC_ABOUT_ICON, m_StaticIcon);
- DDX_Text(pDX, IDC_STATIC_ABOUT_VERSION, m_sVersion);
- DDX_Text(pDX, IDC_STATIC_ABOUT_COPYRIGHT, m_sCopyright);
- DDX_Control(pDX, IDC_STATIC_ABOUT_SYSLINK1, m_Link);
- }
- BOOL CAboutDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- this->SetIcon(m_hIcon,FALSE);
- this->SetIcon(m_hIcon,TRUE);
- //;
- m_StaticIcon.SetIcon(m_hIcon);
- //version;
- int retload = 0;
- CString temp;
- temp.Empty();
- retload = temp.LoadString(IDS_VERSION_MAJOR);
- m_sVersion.Append(temp);
- m_sVersion +=".";
- retload = temp.LoadString(IDS_VERSION_MINOR);
- m_sVersion.Append(temp);
- m_sVersion +=".";
- retload = temp.LoadString(IDS_VERSION_REVISION);
- m_sVersion.Append(temp);
- m_sVersion +=".";
- retload = temp.LoadString(IDS_VERSION_BUILD);
- m_sVersion.Append(temp);
- //copyright;
- temp.Empty();
- retload = temp.LoadString(IDS_COPYRIGHT_AUTHOR);
- m_sCopyright.Append(temp);
- m_sCopyright +=" ";
- retload = temp.LoadString(IDS_COPYRIGHT_UNIVERSITY);
- m_sCopyright.Append(temp);
- m_sCopyright +=" ";
- retload = temp.LoadString(IDS_COPYRIGHT_YEAR);
- m_sCopyright.Append(temp);
- //MailTo;
- retload = temp.LoadString(IDS_COPYRIGHT_EMAIL);
- m_Link.SetWindowTextW(_T("<a>rubost@outlook.com</a>"));
-
- UpdateData(FALSE);
- return TRUE;
- }
-
- BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
- ON_NOTIFY(NM_CLICK, IDC_STATIC_ABOUT_SYSLINK1, &CAboutDlg::OnNMClickStaticAboutSyslink1)
- END_MESSAGE_MAP()
-
- void CAboutDlg::OnNMClickStaticAboutSyslink1(NMHDR *pNMHDR, LRESULT *pResult)
- {
- *pResult = 0;
- ShellExecute(NULL,_T("open"),_T("mailto:rubost@outlook.com"),NULL,NULL,SW_NORMAL);
- return;
- }