-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAboutDlg.cpp
53 lines (43 loc) · 1.37 KB
/
AboutDlg.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
////////////////////////////////////////////////////////////////////////////////
//! \file AboutDlg.cpp
//! \brief The AboutDlg class definition.
//! \author Chris Oldwood
#include "Common.hpp"
#include "AboutDlg.hpp"
#include <WCL/Path.hpp>
#include <WCL/VerInfoReader.hpp>
////////////////////////////////////////////////////////////////////////////////
//! Constructor.
AboutDlg::AboutDlg()
: CDialog(IDD_ABOUT)
{
DEFINE_CTRL_TABLE
CTRL(IDC_VERSION, &m_versionLabel)
CTRL(IDC_COPYRIGHT, &m_crightLabel)
CTRL(IDC_EMAIL, &m_emailLabel)
CTRL(IDC_WEBSITE, &m_webLabel)
END_CTRL_TABLE
// Set the URL label protocols.
m_emailLabel.Protocol(TXT("mailto:"));
m_webLabel.Protocol(TXT("http://"));
}
////////////////////////////////////////////////////////////////////////////////
//! Destructor.
AboutDlg::~AboutDlg()
{
}
////////////////////////////////////////////////////////////////////////////////
//! Handle dialog creation.
void AboutDlg::OnInitDialog()
{
// Extract details from the resources.
tstring filename = CPath::Application();
tstring version = WCL::VerInfoReader::GetStringValue(filename, WCL::VerInfoReader::PRODUCT_VERSION);
tstring copyright = WCL::VerInfoReader::GetStringValue(filename, WCL::VerInfoReader::LEGAL_COPYRIGHT);
#ifdef _DEBUG
version += TXT(" [Debug]");
#endif
// Update UI.
m_versionLabel.Text(version);
m_crightLabel.Text(copyright);
}