-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDMAboutDialog.cpp
More file actions
58 lines (38 loc) · 1.06 KB
/
Copy pathDMAboutDialog.cpp
File metadata and controls
58 lines (38 loc) · 1.06 KB
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
// DMAboutDialog.cpp : implementation file
//
#include "stdafx.h"
#include "DM Helper.h"
#include "DMAboutDialog.h"
#include "DM Helper Common.h"
// CDMAboutDialog dialog
IMPLEMENT_DYNAMIC(CDMAboutDialog, CDialog)
CDMAboutDialog::CDMAboutDialog(CWnd* pParent /*=NULL*/)
: CDialog(CDMAboutDialog::IDD, pParent)
, m_szVersion(_T(""))
{
}
CDMAboutDialog::~CDMAboutDialog()
{
}
void CDMAboutDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_VERSION_STATIC, m_szVersion);
}
BEGIN_MESSAGE_MAP(CDMAboutDialog, CDialog)
END_MESSAGE_MAP()
// CDMAboutDialog message handlers
BOOL CDMAboutDialog::OnInitDialog()
{
CDialog::OnInitDialog();
LONG lValue = DMH_CURRENT_VERSION;
//10000
LONG lMajor = DMH_CURRENT_VERSION / 10000L;
lValue -= lMajor * 10000L;
LONG lMinor = lValue / 1000L;
lValue -= lMinor * 1000L;
m_szVersion.Format("Version: %01d.%01d.%03d", lMajor, lMinor, lValue);
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}