-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSetIP.cpp
More file actions
68 lines (56 loc) · 1.33 KB
/
SetIP.cpp
File metadata and controls
68 lines (56 loc) · 1.33 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
59
60
61
62
63
64
65
66
67
68
// SetIP.cpp : implementation file
//
#include "stdafx.h"
#include "SID_2FY.h"
#include "SetIP.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetIP dialog
CSetIP::CSetIP(CWnd* pParent /*=NULL*/)
: CDialog(CSetIP::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetIP)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CSetIP::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetIP)
DDX_Control(pDX, IDC_IPADDRESS, m_IP);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetIP, CDialog)
//{{AFX_MSG_MAP(CSetIP)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetIP message handlers
void CSetIP::OnOK()
{
// TODO: Add extra validation here
if (pParent)
{
m_IP.GetAddress(pParent->m_ipaddrDevice);
}
if (setParent)
{
m_IP.GetAddress(setParent->m_setIP);
}
CDialog::OnOK();
}
BOOL CSetIP::OnInitDialog()
{
CDialog::OnInitDialog();
if (setParent != NULL)
{
m_IP.SetAddress(setParent->m_setIP);
}
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}