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?



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.



Software FX, Inc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...