diff options
Diffstat (limited to 'Bus')
-rw-r--r-- | Bus/IvyProbe/IvyProbeDlg.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Bus/IvyProbe/IvyProbeDlg.cpp b/Bus/IvyProbe/IvyProbeDlg.cpp index c37ee48..9cd53c3 100644 --- a/Bus/IvyProbe/IvyProbeDlg.cpp +++ b/Bus/IvyProbe/IvyProbeDlg.cpp @@ -78,6 +78,7 @@ void CTestDlg::DoDataExchange(CDataExchange* pDX) {
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestDlg)
+ DDX_Control(pDX, IDC_BIND, m_bind);
DDX_Control(pDX, IDC_MSG, m_msgToSend);
DDX_Control(pDX, IDC_TEXT, m_text);
DDX_Control(pDX, IDC_SLIDER7, m_slider7);
@@ -101,6 +102,7 @@ BEGIN_MESSAGE_MAP(CTestDlg, CDialog) ON_WM_VSCROLL()
ON_EN_VSCROLL(IDC_MSG, OnVscrollMsg)
ON_WM_CLOSE()
+ ON_EN_VSCROLL(IDC_BIND, OnVscrollBind)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -153,11 +155,11 @@ BOOL CTestDlg::OnInitDialog() m_slider6.SetWindowText( "MIDICS10:fader6 value=" );
m_slider7.SetWindowText( "MIDICS10:fader7 value=" );
- bus = new Ivy( "TEST NT","TEST NT READY",this);
+ bus = new Ivy( "TEST NT","TEST NT READY",this,FALSE);
bus->BindMsg("^MIDICS10:fader([0-7]) value=([0-9]+)", BUS_CALLBACK_OF(CTestDlg, FaderCallback));
bus->BindMsg("^MIDICS10:knob([0-5]) value=([0-9]+)", BUS_CALLBACK_OF(CTestDlg, FaderCallback));
- bus->BindMsg("(.*)", BUS_CALLBACK_OF(CTestDlg, IvyCallback ));
+// bus->BindMsg("(.*)", BUS_CALLBACK_OF(CTestDlg, IvyCallback ));
//bus->BindMsg("^S( A=([0-9]+))?( B=([0-9]+))?",cb);
m_busnumber = bus->GetDomain( m_busnumber );
@@ -357,3 +359,22 @@ void CTestDlg::OnOK() if (bus) delete bus;
CDialog::OnOK();
}
+
+void CTestDlg::OnVscrollBind()
+{
+ char buffer[200];
+ int line = m_bind.GetFirstVisibleLine( ) -1 ;
+ if ( line >= 0 )
+ {
+ int len = m_bind.GetLine( line , buffer, sizeof(buffer)-1);
+ if ( len )
+ {
+ buffer[len] = '\0';
+ TRACE("IDC BIND Scroll %d len= %d %s\n",line,len, buffer);
+ int count = bus->BindMsg( buffer , BUS_CALLBACK_OF(CTestDlg, IvyCallback ));
+ CString mess;
+ mess.Format("Binding to '%s'\r\n",buffer);
+ WriteMessage( mess );
+ }
+ }
+}
|