forked from sabrogden/Ditto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
About.cpp
132 lines (98 loc) · 2.86 KB
/
About.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// About.cpp : implementation file
// test test test
//Main branch test
#include "stdafx.h"
#include "cp_main.h"
#include "About.h"
#include "InternetUpdate.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAbout property page
IMPLEMENT_DYNCREATE(CAbout, CPropertyPage)
CAbout::CAbout() : CPropertyPage(CAbout::IDD)
{
m_csTitle = theApp.m_Language.GetString("AboutTitle", "About");
m_psp.pszTitle = m_csTitle;
m_psp.dwFlags |= PSP_USETITLE;
//{{AFX_DATA_INIT(CAbout)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CAbout::~CAbout()
{
}
void CAbout::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAbout)
DDX_Control(pDX, IDC_STATIC_LINK, m_Link);
DDX_Control(pDX, IDC_HYPER_LINK, m_HyperLink);
DDX_Control(pDX, IDC_LIST, m_List);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAbout, CPropertyPage)
//{{AFX_MSG_MAP(CAbout)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAbout message handlers
BOOL CAbout::OnInitDialog()
{
CPropertyPage::OnInitDialog();
m_List.AddString(_T("Ditto"));
CInternetUpdate update;
auto runningVersion = update.GetRunningVersion();
CString cs = update.GetVersionString(runningVersion);
CString csText;
csText = " Version " + cs;
#if _WIN64
csText += " 64bit";
#else
csText += " 32bit";
#endif
m_List.AddString(csText);
const char *SqliteVersion = sqlite3_libversion();
csText = " Sqlite Version ";
csText += SqliteVersion;
m_List.AddString(csText);
cs = CGetSetOptions::GetExeFileName();;
csText = " Exe Path " + cs;
m_List.AddString(csText);
cs = CGetSetOptions::GetDBPath();
csText = " DB Path " + cs;
m_List.AddString(csText);
m_List.AddString(_T(""));
m_List.AddString(_T("Credits"));
cs = " Authors - Scott Brogden, sabrogden@users.sourceforge.net";
m_List.AddString(cs);
cs = " - Kevin Edwards, ingenuus@users.sourceforge.net";
m_List.AddString(cs);
m_List.AddString(_T(""));
m_List.AddString(_T("Addins"));
//Show what addins are loaded
CStringArray arr;
theApp.m_Addins.AboutScreenText(arr);
INT_PTR count = arr.GetCount();
for(int i = 0; i < count; i++)
{
m_List.AddString(_T(" ") + arr[i]);
}
CRect rect;
GetClientRect(rect);
rect.bottom -= 30;
m_List.MoveWindow(rect);
rect.top = rect.bottom + 10;
rect.bottom = rect.top + 30;
m_HyperLink.MoveWindow(rect);
m_HyperLink.SetURL(_T("mailto:sabrogden@gmail.com"));
rect.top = rect.bottom + 5;
rect.bottom = rect.top + 5;
m_Link.MoveWindow(rect);
m_Link.SetURL(_T("https://ditto-cp.sourceforge.io/"));
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}