LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set a CWGraph event ?

Hi,

I'm using Labwindows/CVI 6.0 in win2K, Using a CWGraph I want to be able to track the X Y position of the cursor each time that the user moves it.

I have tried to use DCWGraphEventsRegOnCursorChange, but I don't know how to write the correcte syntaxe and how to set the callback, please help me...

Thank you,
0 Kudos
Message 1 of 2
(2,712 Views)
You install the callback with that function. For example,

CWUIControlsLib__DCWGraphEventsRegOnCursorChange (hCWGraph,
CursorChangeCB,
NULL, 1,
NULL);

Then you have to write the callback function. It tells you how to do that in the help for the event functions. Your event callback function will look something like:

HRESULT CVICALLBACK Callback (CAObjHandle caServerObjHandle,
void *caCallbackData,
long *cursorIndex,
VARIANT *XPos,
VARIANT *YPos,
VBOO
L *bTracking)
{
//Your code here
return 0;
}

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(2,712 Views)