I am using a generic GRAPH and wanted to process the coordinate that the user clicks on. However, when the left-click callback is called, and I use GetGraphCursor(x,y), the returned (x,y) coordinates are of the previous location.
- I cannot use double-click, because that performs a different function.
- and when the user left-clicks, the cursor moves into the new position, but the GetGraphCursor() returns the previous position...
myCallback()
{
if (event == EVENT_LEFT_CLICK)
{
double x,y;
GetGraphCursor( panelID, PIXEL_GRAPH, 1,&x, &y );
SetCtrlVal( panelID, PIXEL_X, (int)x );
SetCtrlVal( panelID, PIXEL_Y, (int)y );
} else if (event == EVENT_LEFT_DOUBLE_CL
ICK) {
// do somthing else
}
}