Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor message functions of NiGRaph doesn't response

I declair CursorMouseDownCwgraph1/CursorMouseUpCwgraph1/CursorMouseMoveCwgraph1 functions in my app.

by they do not response. While I also declaired  OnValueChangedCwbooleanLock and CursorChangeCwgraph1 and

they work well. It seems that there are no difference between the above two times of declairation as follows:

 

1,  .h

 

protected:
    //    自定义消息,2010-4-21
    afx_msg LRESULT OnSelectedLineChanged(WPARAM wParam, LPARAM lParam);
   
    //    Cwgraph图像的光标处理函数。
    afx_msg void CursorChangeCwgraph1(long* CursorIndex, VARIANT* XPos, VARIANT* YPos, BOOL* bTracking);
    afx_msg void ValueChangedCwboolean1(BOOL Value);
    afx_msg void PanCwgraph1();
    afx_msg void ZoomCwgraph1();
    afx_msg void CursorMouseDownCwgraph1(short* Button, short* Shift, VARIANT* XPos, VARIANT* YPos, short* CursorIndex, long* CursorPart);
    afx_msg void CursorMouseMoveCwgraph1(short* Button, short* Shift, VARIANT* XPos, VARIANT* YPos, short* CursorIndex, long* CursorPart);
    afx_msg void CursorMouseUpCwgraph1(short* Button, short* Shift, VARIANT* XPos, VARIANT* YPos, short* CursorIndex, long* CursorPart);


    DECLARE_MESSAGE_MAP()

    DECLARE_EVENTSINK_MAP()

 

2, .cpp

 

 BEGIN_EVENTSINK_MAP(CResultView, CFormView)
    ON_EVENT(CResultView, IDC_CWGRAPH1, 1, CResultView::CursorChangeCwgraph1, VTS_PI4 VTS_PVARIANT VTS_PVARIANT VTS_PBOOL)
    ON_EVENT(CResultView, IDC_CWBOOLEAN1, 1, CResultView::ValueChangedCwboolean1, VTS_BOOL)
    ON_EVENT(CResultView, IDC_CWGRAPH1, 16, CResultView::PanCwgraph1, VTS_NONE)
    ON_EVENT(CResultView, IDC_CWGRAPH1, 15, CResultView::ZoomCwgraph1, VTS_NONE)
    ON_EVENT(CResultView, IDC_CWGRAPH1, 4, CResultView::CursorMouseDownCwgraph1, VTS_PI2 VTS_PI2 VTS_PVARIANT VTS_PVARIANT VTS_PI2 VTS_PI4)
    ON_EVENT(CResultView, IDC_CWGRAPH1, 2, CResultView::CursorMouseMoveCwgraph1, VTS_PI2 VTS_PI2 VTS_PVARIANT VTS_PVARIANT VTS_PI2 VTS_PI4)
    ON_EVENT(CResultView, IDC_CWGRAPH1, 3, CResultView::CursorMouseUpCwgraph1, VTS_PI2 VTS_PI2 VTS_PVARIANT VTS_PVARIANT VTS_PI2 VTS_PI4)
END_EVENTSINK_MAP()

 

 

Moreover, How to use short* Button parameter in CursorMouseDownCwgraph1?

 

I go through Ni sample code "Multiple Cursors.2005" and so so, but don't find sample segment for  CursorMouseDownCwgraph1/CursorMouseUpCwgraph1/CursorMouseMoveCwgraph1. Are there sample codes ?

 

 

 

 

0 Kudos
Message 1 of 1
(5,567 Views)