forked from yuanyuanxiang/RemoteController
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIPConfigDlg.cpp
55 lines (38 loc) · 974 Bytes
/
IPConfigDlg.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
// IPConfigDlg.cpp : 实现文件
//
#include "stdafx.h"
#include "RemoteController.h"
#include "IPConfigDlg.h"
#include "afxdialogex.h"
// CIPConfigDlg 对话框
IMPLEMENT_DYNAMIC(CIPConfigDlg, CDialog)
CIPConfigDlg::CIPConfigDlg(CString sTitle, CWnd* pParent /*=NULL*/)
: CDialog(CIPConfigDlg::IDD, pParent)
, m_strTitle(sTitle)
, m_strIpAddr(_T(""))
, m_bModIP(TRUE)
, m_nPort(9999)
{
}
CIPConfigDlg::~CIPConfigDlg()
{
}
void CIPConfigDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT_IPADDR, m_IpAddr);
DDX_Control(pDX, IDC_EDIT_IPPORT, m_Port);
DDX_Text(pDX, IDC_EDIT_IPADDR, m_strIpAddr);
DDX_Text(pDX, IDC_EDIT_IPPORT, m_nPort);
DDV_MinMaxInt(pDX, m_nPort, 1, 65535);
}
BEGIN_MESSAGE_MAP(CIPConfigDlg, CDialog)
END_MESSAGE_MAP()
// CIPConfigDlg 消息处理程序
BOOL CIPConfigDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetWindowText(m_strTitle);
m_IpAddr.EnableWindow(m_bModIP);
return TRUE;
}