-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDialogConfig.h
88 lines (72 loc) · 2.25 KB
/
DialogConfig.h
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#pragma once
#include "afxwin.h"
// CDialogConfig dialog
class CDialogConfig : public CDialog
{
DECLARE_DYNAMIC(CDialogConfig)
public:
CDialogConfig(CMainFrame* pMainFrame); // standard constructor
virtual ~CDialogConfig();
// Dialog Data
enum { IDD = IDD_DIALOG_CONFIG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
BOOL PreTranslateMessage(MSG* pMsg); // Tooltip support
DECLARE_MESSAGE_MAP()
private:
// Control object variables
CButton m_cLEDType1;
CButton m_cLEDType2;
CStatic m_cUpdateFrequencyText1;
CStatic m_cUpdateFrequencyText2;
CEdit m_cUpdateFrequencyEdit;
CEdit m_c100Percent;
CEdit m_cCounterPath;
CButton m_cUpdateINI;
CButton m_cDefaultValues;
CComboBox m_cSelectPerfObjects;
CComboBox m_cSelectPerfCounters;
CComboBox m_cSelectPerfInstances;
CButton m_cBuildPathFromSelection;
CEdit m_cSelectPerfDescription;
// Control value variables
int m_nLEDType;
DWORD m_nUpdateFrequency;
int m_nUpdateINI;
double m_d100Percent;
CString m_sCounterPath;
CString m_sPerfObject;
CString m_sPerfCounter;
CString m_sPerfInstance;
CString m_sPerfDescription;
// Tooltip support
CToolTipCtrl m_oToolTip;
// Member variables
CMainFrame* m_pMainFrame;
CString m_sSelectedPerfPath;
// Memory buffers for PdhEnumObjectItems
TCHAR* m_sBufferCounters;
DWORD m_nBufferCounters;
TCHAR* m_sBufferInstances;
DWORD m_nBufferInstances;
// Memory buffer for PdhGetCounterInfo
DWORD m_nBufferInfo;
PDH_COUNTER_INFO* m_oBufferInfo;
// Functions
BOOL OnInitDialog ();
void ApplySettings ();
void InitPerfBrowser ();
DWORD SplitPerfPath (CString sCounterPath, CString& sObject, CString& sCounter, CString& sInstance);
DWORD BuildPerfPath (CString& sCounterPath, CString sObject, CString sCounter, CString sInstance);
DWORD GetCounterExplainText (CString sCounterPath, CString& sExplainText);
public:
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedDefaultvalues();
afx_msg void OnBnClickedCancel();
afx_msg void OnBnClickedApply();
//afx_msg void OnBnClickedCounterpathSelect();
afx_msg void OnCbnSelchangePerfObjects();
afx_msg void OnBnClickedUseSelectedDataSource();
afx_msg void OnCbnSelchangePerfCounters();
afx_msg void OnCbnSelchangePerfInstances();
};