-
Notifications
You must be signed in to change notification settings - Fork 0
/
CorrectOptions.cpp
120 lines (105 loc) · 4.17 KB
/
CorrectOptions.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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// CorrectOptions.cpp : implementation file
//
#include "stdafx.h"
#include "MidiGlassApp.h"
#include "CorrectOptions.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CMidiWorksApp theApp;
//
////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////
// CCorrectOptions dialog
IMPLEMENT_DYNAMIC(CCorrectOptions, CMWDialog)
//
////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////
CCorrectOptions::CCorrectOptions(CWnd* pParent /*=NULL*/) : CMWDialog(CCorrectOptions::IDD, pParent)
{
//{{AFX_DATA_INIT(CCorrectOptions)
//}}AFX_DATA_INIT
}
//
////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////
void CCorrectOptions::DoDataExchange(CDataExchange* pDX)
{
CMWDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCorrectOptions)
DDX_Control(pDX, IDC_SYSEX, m_SysEx);
DDX_Control(pDX, IDOK, m_Ok);
DDX_Control(pDX, IDCANCEL, m_Cancel);
DDX_Control(pDX, IDC_FILTER, m_Filter);
DDX_Control(pDX, IDC_BANKSELECTLOW, m_BankSelectLow);
DDX_Control(pDX, IDC_BANKSELECTHIGH, m_BankSelectHigh);
DDX_Control(pDX, IDC_ADDSTARTTRACK, m_AddStartOfTrack);
DDX_Control(pDX, IDC_ADDENDTRACK, m_AddEndOfTrack);
DDX_Control(pDX, IDC_CORRECT_STARTOFTRACK, m_CorrectStartOfTrack);
//}}AFX_DATA_MAP
}
//
////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////
BEGIN_MESSAGE_MAP(CCorrectOptions, CMWDialog)
//{{AFX_MSG_MAP(CCorrectOptions)
ON_BN_CLICKED(IDOK, &CCorrectOptions::OnBnClickedOk)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//
////////////////////////////////////////////////////////////////////////////////////
// CCorrectOptions message handlers
//
////////////////////////////////////////////////////////////////////////////////////
BOOL CCorrectOptions::OnInitDialog()
{
CMWDialog::OnInitDialog();
//
m_SysEx.SetCurSel ( theApp.m_iSysEx );
m_AddStartOfTrack.SetCheck ( theApp.m_bAddStartOfTrack );
m_AddEndOfTrack.SetCheck ( theApp.m_bAddEndOfTrack );
m_BankSelectLow.SetCheck ( theApp.m_bBankSelectLow );
m_BankSelectHigh.SetCheck ( theApp.m_bBankSelectHigh );
m_Filter.SetCheck ( theApp.m_bFilter );
m_CorrectStartOfTrack.SetCheck ( theApp.m_bCorrectStartOfTrack );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
//
////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////
void CCorrectOptions::OnOK()
{
//
theApp.m_iSysEx = m_SysEx.GetCurSel ();
theApp.m_bAddStartOfTrack = m_AddStartOfTrack.GetCheck ( );
theApp.m_bAddEndOfTrack = m_AddEndOfTrack.GetCheck ( );
theApp.m_bBankSelectLow = m_BankSelectLow.GetCheck ( );
theApp.m_bBankSelectHigh = m_BankSelectHigh.GetCheck ( );
theApp.m_bFilter = m_Filter.GetCheck ( );
theApp.m_bCorrectStartOfTrack = m_CorrectStartOfTrack.GetCheck ( );
theApp.WriteProfileInt ( "Correction", "System Exclusive", theApp.m_iSysEx );
theApp.WriteProfileInt ( "Correction", "Add Start Of Track", theApp.m_bAddStartOfTrack );
theApp.WriteProfileInt ( "Correction", "Add End Of Track", theApp.m_bAddEndOfTrack );
theApp.WriteProfileInt ( "Correction", "Remove Bank Select Low", theApp.m_bBankSelectLow );
theApp.WriteProfileInt ( "Correction", "Remove Bank Select High", theApp.m_bBankSelectHigh );
theApp.WriteProfileInt ( "Correction", "Filter Tracks By Channel", theApp.m_bFilter );
theApp.WriteProfileInt ( "Correction", "Correct Start Of Track", theApp.m_bCorrectStartOfTrack );
CMWDialog::OnOK();
}
//
////////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////////
void CCorrectOptions::OnBnClickedOk()
{
//
CCorrectOptions::OnOK();
}