Jump to content
Software FX Community

convert coordinates


User (Legacy)

Recommended Posts

Hi, All:

When I use PaintInfo with CPI_MARKERTOPIXEL to retrieve the pixel position

of a marker, it returns

coordinates of marker that relative to the chart window. And the

coordinates change when you hide/show series legend. I was wondering what

rule I should use if I want to convert this coordinate to screen coordinate

or client coordinate?

Thanks,

Danqing

Link to comment
Share on other sites

This coordinates is relative to the chart drawing area (without the legends,

toolbars and data editor), which is a window by itself. There is no API to

obtain this window handle but if you need it you can do the following trick:

chart1.MouseCapture = true

hwnd = GetCapture() ' Windows API

chart1.MouseCapture = false

You can later use this window handle to do ClientToScreen.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...