From 076f6b093019adbb659c245d0b2a8380cf511d1c Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:10:28 +0000 Subject: Utilisateur : Fcolin Date : 22/12/98 Heure : 16:54 Archivé dans $/Bus/Test Commentaire: modif ligne message a emettre (vss 2) --- Bus/IvyProbe/IvyProbeDlg.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Bus/IvyProbe/IvyProbeDlg.cpp') diff --git a/Bus/IvyProbe/IvyProbeDlg.cpp b/Bus/IvyProbe/IvyProbeDlg.cpp index cea28e4..be948ac 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_MSG, m_msgToSend); DDX_Control(pDX, IDC_TEXT, m_text); DDX_Control(pDX, IDC_SLIDER7, m_slider7); DDX_Control(pDX, IDC_SLIDER6, m_slider6); @@ -99,6 +100,7 @@ BEGIN_MESSAGE_MAP(CTestDlg, CDialog) ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_START, OnStart) ON_WM_VSCROLL() + ON_EN_VSCROLL(IDC_MSG, OnVscrollMsg) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -215,6 +217,8 @@ void CTestDlg::OnStart() bus->BindMsg("^MIDICS10:fader([0-7]) value=([0-9]+)",fader); bus->BindMsg("^MIDICS10:knob([0-5]) value=([0-9]+)",fader); + bus->BindMsg("(.*)",new BusMessageCallbackOf(this, BusCallback )); + //bus->BindMsg("^S( A=([0-9]+))?( B=([0-9]+))?",cb); bus->start(); } @@ -313,3 +317,20 @@ void CTestDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) bus->SendMsg( text ); CDialog::OnVScroll(nSBCode, nPos, pScrollBar); } + +void CTestDlg::OnVscrollMsg() +{ + // TODO: Add your control notification handler code here + char buffer[200]; + int line = m_msgToSend.GetFirstVisibleLine( ) -1 ; + if ( line >= 0 ) + { + int len = m_msgToSend.GetLine( line , buffer, sizeof(buffer)-1); + if ( len ) + { + buffer[len] = '\0'; + TRACE("IDC MSG Scroll %d len= %d %s\n",line,len, buffer); + bus->SendMsg( buffer ); + } + } +} -- cgit v1.1