diff options
Diffstat (limited to 'Bus/IvyProbe/IvyProbeDlg.cpp')
-rw-r--r-- | Bus/IvyProbe/IvyProbeDlg.cpp | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/Bus/IvyProbe/IvyProbeDlg.cpp b/Bus/IvyProbe/IvyProbeDlg.cpp index be948ac..2112270 100644 --- a/Bus/IvyProbe/IvyProbeDlg.cpp +++ b/Bus/IvyProbe/IvyProbeDlg.cpp @@ -211,13 +211,11 @@ HCURSOR CTestDlg::OnQueryDragIcon() void CTestDlg::OnStart()
{
UpdateData(TRUE);
- bus = new Bus( "TEST NT", m_busnumber,"TEST NT READY",new BusApplicationCallbackOf<CTestDlg>(this, ApplicationCallback));
- BusMessageCallbackOf<CTestDlg> *fader;
- fader = new BusMessageCallbackOf<CTestDlg>(this, FaderCallback );
-
- bus->BindMsg("^MIDICS10:fader([0-7]) value=([0-9]+)",fader);
- bus->BindMsg("^MIDICS10:knob([0-5]) value=([0-9]+)",fader);
- bus->BindMsg("(.*)",new BusMessageCallbackOf<CTestDlg>(this, BusCallback ));
+ bus = new Bus( "TEST NT", m_busnumber,"TEST NT READY",this);
+
+ 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, BusCallback ));
//bus->BindMsg("^S( A=([0-9]+))?( B=([0-9]+))?",cb);
bus->start();
@@ -228,14 +226,14 @@ void CTestDlg::BusCallback(BusApplication *app, int argc, const char **argv) int i;
CString text;
TRACE(" Called function args:");
- m_text.SetSel( -1, -1, TRUE );
+// m_text.SetSel( -1, -1, FALSE );
text.Format("Bus callback %d args\r\n",argc );
- m_text.ReplaceSel( text );
+// m_text.ReplaceSel( text );
for ( i = 0; i < argc; i++ )
{
- m_text.SetSel( -1, -1, TRUE );
+// m_text.SetSel( -1, -1, FALSE );
text.Format("Bus callback arg%d '%s'\r\n",i, argv[i] );
- m_text.ReplaceSel( text );
+// m_text.ReplaceSel( text );
TRACE(" '%s'",argv[i]);
}
TRACE("\n");
@@ -290,19 +288,25 @@ UpdateData(FALSE); }
-void CTestDlg::DirectCallback(BusApplication *app, int id, const char *arg)
+void CTestDlg::OnDirectMessage(BusApplication *app, int id, const char *arg)
{
TRACE("Direct Msg Receive %d, %s\n",id,arg );
}
-void CTestDlg::ApplicationCallback(BusApplication *app, int event)
+void CTestDlg::OnApplicationConnected(BusApplication *app)
{
CString text;
- m_text.SetSel( -1, -1, TRUE );
- text.Format("Application: %s %s\r\n",(LPCSTR)(app->GetName()), event ? "bye" : "ready" );
+ m_text.SetSel( -1, -1, FALSE );
+ text.Format("Application: %s ready\r\n",(LPCSTR)(app->GetName()) );
+ m_text.ReplaceSel( text );
+}
+void CTestDlg::OnApplicationDisconnected(BusApplication *app)
+{
+ CString text;
+ m_text.SetSel( -1, -1, FALSE );
+ text.Format("Application: %s bye\r\n",(LPCSTR)(app->GetName()) );
m_text.ReplaceSel( text );
}
-
void CTestDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
|