LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read cursors of plots of CWGRAPH control

hi,
This problem is about CWUI_graph AcitveX control.There are 4 plots in

my graph. I want to continuously read the coordinate of the 4 plots at

the same when I move the cursor whose crosshair is" major X &

Minor",Snap Mode "Point on any plot".
I have registered the cursorchange callback:
HRESULT CVICALLBACK finddata(CAObjHandle caServerObjHandle,
void *caCallbackData,
long *cursorIndex,
VARIANT *XPos,
VARIANT *YPos,
VBOOL *bTracking);
But it can only read one plot at a time.
So I use "CWUIControlsLib_CWCursorSetPlot" to change the plot of

cursor ,and t
hen I use"CWUIControlsLib_CWCursorSetXPosition" to set

the poistion of the cursor in the callback function. I thought it

would invoke the callback function again because the cursor had been

changed,in this way I can read the YPos of that plot.But I failed,the

callback function had not been invoked.
who can tell me what is the best way to read cursors of all plots at

the same time. Thanks a lot.
0 Kudos
Message 1 of 2
(2,534 Views)
Hi,

The ActiveX callback function will not be called if you change the cursors yourself, the callback will only be generated when the user makes some chages to it. However you can call the callback functio yoursef; basically after you change the possition of the cursor you call finddata(...) with all the parameters required. If you don't have a parameter available just pass a dummy value.

I belive this will be the fastes way to go through all the plots.

I hope this helps.

Regards,
Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,534 Views)