-rw-r--r-- | OptionsDlg.cpp | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/OptionsDlg.cpp b/OptionsDlg.cpp new file mode 100644 index 0000000..1ee8da7 --- a/dev/null +++ b/OptionsDlg.cpp | |||
@@ -0,0 +1,86 @@ | |||
1 | // OptionsDlg.cpp : implementation file | ||
2 | // | ||
3 | |||
4 | #include "stdafx.h" | ||
5 | #include "Dipstick.h" | ||
6 | #include "OptionsDlg.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 | // COptionsDlg dialog | ||
16 | |||
17 | |||
18 | COptionsDlg::COptionsDlg(CWnd* pParent /*=NULL*/) | ||
19 | : CDialog(COptionsDlg::IDD, pParent) | ||
20 | { | ||
21 | //{{AFX_DATA_INIT(COptionsDlg) | ||
22 | m_Pings = 0; | ||
23 | m_PingSize = 0; | ||
24 | m_TimeOut = 0; | ||
25 | m_Interval = 0; | ||
26 | m_MaxThreads = 0; | ||
27 | m_bMSWorkAround = FALSE; | ||
28 | m_bAutoBest = FALSE; | ||
29 | m_bAdjustInn = FALSE; | ||
30 | m_bIgnorelative = FALSE; | ||
31 | m_bAdjust = FALSE; | ||
32 | //}}AFX_DATA_INIT | ||
33 | } | ||
34 | |||
35 | |||
36 | void COptionsDlg::DoDataExchange(CDataExchange* pDX) | ||
37 | { | ||
38 | CDialog::DoDataExchange(pDX); | ||
39 | //{{AFX_DATA_MAP(COptionsDlg) | ||
40 | DDX_Control(pDX, IDC_SPINTIMEOUT, m_SpinTimeOutCtl); | ||
41 | DDX_Control(pDX, IDC_SPINTERVAL, m_SpinIntervalCtl); | ||
42 | DDX_Control(pDX, IDC_SPINSIZE, m_SpinPingSizeCtl); | ||
43 | DDX_Control(pDX, IDC_SPINPINGS, m_SpinPingsCtl); | ||
44 | DDX_Control(pDX, IDC_SPINMAXPINGS, m_SpinMaxThreadsCtl); | ||
45 | DDX_Text(pDX, IDC_NPINGS, m_Pings); | ||
46 | DDX_Text(pDX, IDC_PACKETSIZE, m_PingSize); | ||
47 | DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut); | ||
48 | DDX_Text(pDX, IDC_INTERVAL, m_Interval); | ||
49 | DDX_Text(pDX, IDC_MAXPINGS, m_MaxThreads); | ||
50 | DDV_MinMaxUInt(pDX, m_MaxThreads, 1, 100); | ||
51 | DDX_Check(pDX, IDC_MSWORKAROUND, m_bMSWorkAround); | ||
52 | DDX_Check(pDX, IDC_AUTOBEST, m_bAutoBest); | ||
53 | DDX_Check(pDX, IDC_ADJUSTINN, m_bAdjustInn); | ||
54 | DDX_Check(pDX, IDC_IGNORELA, m_bIgnorelative); | ||
55 | DDX_Check(pDX, IDC_SMARTADJUST, m_bAdjust); | ||
56 | //}}AFX_DATA_MAP | ||
57 | } | ||
58 | |||
59 | |||
60 | BEGIN_MESSAGE_MAP(COptionsDlg, CDialog) | ||
61 | //{{AFX_MSG_MAP(COptionsDlg) | ||
62 | ON_WM_HELPINFO() | ||
63 | //}}AFX_MSG_MAP | ||
64 | END_MESSAGE_MAP() | ||
65 | |||
66 | ///////////////////////////////////////////////////////////////////////////// | ||
67 | // COptionsDlg message handlers | ||
68 | |||
69 | BOOL COptionsDlg::OnInitDialog() | ||
70 | { | ||
71 | CDialog::OnInitDialog(); | ||
72 | |||
73 | m_SpinIntervalCtl.SetRange(0,60); | ||
74 | m_SpinMaxThreadsCtl.SetRange(1,50); | ||
75 | m_SpinPingsCtl.SetRange(1,100); | ||
76 | m_SpinPingSizeCtl.SetRange(0,32767); | ||
77 | m_SpinTimeOutCtl.SetRange(1,60); | ||
78 | |||
79 | return TRUE; | ||
80 | } | ||
81 | |||
82 | BOOL COptionsDlg::OnHelpInfo(HELPINFO* pHelpInfo) | ||
83 | { | ||
84 | WinHelp(IDD|0x20000l); | ||
85 | return TRUE; | ||
86 | } | ||