From 51ff641ceca79c959cd85e6b00af484fd5d10b78 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:10:36 +0000 Subject: Utilisateur : Fcolin Date : 6/01/00 Heure : 11:15 Archivé dans $/Bus/Test Commentaire: ajout bind to msg (vss 6) --- Bus/IvyProbe/IvyProbeDlg.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Bus/IvyProbe/IvyProbeDlg.cpp') 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 ); + } + } +} -- cgit v1.1