-rw-r--r-- | PropsNetwork.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/PropsNetwork.cpp b/PropsNetwork.cpp new file mode 100644 index 0000000..b5585d7 --- a/dev/null +++ b/PropsNetwork.cpp | |||
@@ -0,0 +1,71 @@ | |||
1 | // PropsNetwork.cpp : implementation file | ||
2 | // | ||
3 | |||
4 | #include "stdafx.h" | ||
5 | #include "PumpKIN.h" | ||
6 | #include "PropsNetwork.h" | ||
7 | |||
8 | #ifdef _DEBUG | ||
9 | #define new DEBUG_NEW | ||
10 | #undef THIS_FILE | ||
11 | static char THIS_FILE[] = __FILE__; | ||
12 | #endif | ||
13 | |||
14 | ///////////////////////////////////////////////////////////////////////////// | ||
15 | // CPropsNetwork property page | ||
16 | |||
17 | IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage) | ||
18 | |||
19 | CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD) | ||
20 | { | ||
21 | //{{AFX_DATA_INIT(CPropsNetwork) | ||
22 | m_ListenPort = 0; | ||
23 | m_SpeakPort = 0; | ||
24 | m_TimeOut = 0; | ||
25 | m_BlockSize = 0; | ||
26 | //}}AFX_DATA_INIT | ||
27 | } | ||
28 | |||
29 | CPropsNetwork::~CPropsNetwork() | ||
30 | { | ||
31 | } | ||
32 | |||
33 | void CPropsNetwork::DoDataExchange(CDataExchange* pDX) | ||
34 | { | ||
35 | CPropertyPage::DoDataExchange(pDX); | ||
36 | //{{AFX_DATA_MAP(CPropsNetwork) | ||
37 | DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl); | ||
38 | DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl); | ||
39 | DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl); | ||
40 | DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl); | ||
41 | DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort); | ||
42 | DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort); | ||
43 | DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut); | ||
44 | DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60); | ||
45 | DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize); | ||
46 | //}}AFX_DATA_MAP | ||
47 | } | ||
48 | |||
49 | |||
50 | BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage) | ||
51 | //{{AFX_MSG_MAP(CPropsNetwork) | ||
52 | //}}AFX_MSG_MAP | ||
53 | END_MESSAGE_MAP() | ||
54 | |||
55 | ///////////////////////////////////////////////////////////////////////////// | ||
56 | // CPropsNetwork message handlers | ||
57 | |||
58 | BOOL CPropsNetwork::OnInitDialog() | ||
59 | { | ||
60 | CPropertyPage::OnInitDialog(); | ||
61 | |||
62 | m_ListenSpinCtl.SetRange(0,32767); | ||
63 | m_SpeakSpinCtl.SetRange(0,32767); | ||
64 | m_TimeSpinCtl.SetRange(5,60); | ||
65 | m_BSizeSpinCtl.SetRange(512,16384); | ||
66 | UDACCEL uda = {0,512}; | ||
67 | m_BSizeSpinCtl.SetAccel(1,&uda); | ||
68 | |||
69 | return TRUE; // return TRUE unless you set the focus to a control | ||
70 | // EXCEPTION: OCX Property Pages should return FALSE | ||
71 | } | ||