Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert the single x and y coordinates returned by a CWGraph Click event to the Cursor X and Y Positions?

I am trying a work around for another problem.

cwCSnapNearestPoint does not give me a CursorDown event (TrackMode = cwGTrackDragCursor). I need to know when the user has clicked on a Cursor. I need to figure out when the user has clicked on a cursor.

The click event gives you coordinates as "Single" which are an OLE_XPOS_PIXELS. How do I convert to the Cursor coordinates (or vis a vis)?

Or better yet is there another way to figure that a cursor has been clicked on (while using cwCSnapNearestPoint and TrackMode = cwGTrackDragCursor )
0 Kudos
Message 1 of 2
(3,459 Views)
Here are a couple potential fixes for the problem. If you are dealing with cursors on the graph, I would look into CursorChangeEvent, CursorMouseDown, CursorMouseUp, and CursorMouseMove. The ChangeEvent is triggered upon repositioning of the cursor. MouseDown triggers on the depression of a mouse button on a cursor, while MouseUp triggers on the button's release. MouseMove is triggered when the mouse is moved over a cursor. These each give X and Y positions in the arguments. If you used these and then made a Sanp to nearest point, you should have the coordinates before you sanpped to the point.
0 Kudos
Message 2 of 2
(3,459 Views)