summaryrefslogtreecommitdiffabout
path: root/PropsNetwork.cpp
blob: b5585d7ce9f748fb701dd323201ee6eee226d9c7 (plain)
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
// PropsNetwork.cpp : implementation file
//

#include "stdafx.h"
#include "PumpKIN.h"
#include "PropsNetwork.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPropsNetwork property page

IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage)

CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD)
{
	//{{AFX_DATA_INIT(CPropsNetwork)
	m_ListenPort = 0;
	m_SpeakPort = 0;
	m_TimeOut = 0;
	m_BlockSize = 0;
	//}}AFX_DATA_INIT
}

CPropsNetwork::~CPropsNetwork()
{
}

void CPropsNetwork::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPropsNetwork)
	DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl);
	DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl);
	DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl);
	DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl);
	DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort);
	DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort);
	DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut);
	DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60);
	DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage)
	//{{AFX_MSG_MAP(CPropsNetwork)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPropsNetwork message handlers

BOOL CPropsNetwork::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
	m_ListenSpinCtl.SetRange(0,32767);
	m_SpeakSpinCtl.SetRange(0,32767);
	m_TimeSpinCtl.SetRange(5,60);
	m_BSizeSpinCtl.SetRange(512,16384);
UDACCEL uda = {0,512};
	m_BSizeSpinCtl.SetAccel(1,&uda);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}