User (Legacy) Posted May 14, 2002 Report Share Posted May 14, 2002 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 Quote Link to comment Share on other sites More sharing options...
Software FX Posted May 17, 2002 Report Share Posted May 17, 2002 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.