Jump to content
Software FX Community

Re: CPI_POSITION returns unexpected values - Bug?

Software FX

Recommended Posts

No. This is not a bug. This coordinates are relative to the chart window, so 

when drawing in the screen the chart it is only offset by the border (+1) so

that when you get the Device Context (CPI_GETDC) you draw relative to that

position. This behavior is the same in Chart FX 3.0 and 98.

The CPI_POSITION call is particularly useful when you print the chart since

the chart is not drawn at 0,0 or close.

You want your pixel position to be relative to what ? to the whole chart

window ? maybe you want to use Windows API's ClientToScreen and

ScreenToClient functions.



Link to comment
Share on other sites


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

  • Create New...