Jump to content
Software FX Community

CPI_POSITION returns unexpected values - Bug?

User (Legacy)

Recommended Posts


We have used custom drag over methods in our app since early ChartFX 3.0.

Now using ChartFX 98, I need to get the pixel coordinates of a point

relative to the chart object, minus any toolbars, data editor, etc. I know

about PixeltoValue and ValuetoPixel, but these both rely on coordinates

relative to the chart as input. All I have is the screen coordinates of the


I have found no way of getting a pixel (x,y) position for a point in the

chart object (relative to the chart origin) given the same position relative

to the screen origin. I have attempted to use the CPI_POSITION parameter of

the PaintInfo method (I assume that's one of its purposes), but only a (1,0)

or (0,1) is returned in any given instance. I assume this is a bug? This is

a big issue for us, as we have to now code for all tool/legend/data editor

objects in any given position (top, bottom, left, right) and try to

determine the pixel point from the offset (UUUGLY).

Could you please let me know

a.) Is there a method/property I'm missing that can do this for me?

b.) When the CPI_POSITION will function as one would expect?

c.) or, as a last resort, a more efficient work-around than the one I'm

coding (see above)?

Thanks again,


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...