ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Draw a line in a mouse drag event
Posted by Armando Galicia on Nov-02-2012 02:52
Hi Support team,

I have an MFC application and I'm using ChartDirector as the main chart graphic engine.  I
wnat to be capable to draw a line and rectangles in my chart with a simple mouse-drag
event. I need to put bookmarks and text as well. How can I do this?

Thanks in advance for your response.


-Armando

  Re: Draw a line in a mouse drag event
Posted by Peter Kwan on Nov-02-2012 15:17
Hi Armando,

If you want to have full feature graphics editing (to draw things, and to modify, edit, reposition, change colors, .... and to do it interactively with the mouse), then you would need to have or develop a graphics editing component, which is something similar to Windows Paint or a very simple Photoshop. You can then use ChartDirector to create a chart, and use your graphics editing component to draw things on the chart image created by ChartDirector. It is similar to drawing things on top of a digital photograph.

If you would like something very simple, you can write code to handle the mouse events and then draw the lines (overriding the OnPaint method and use standad GDI methods to draw lines).

Regards
Peter Kwan

  Re: Draw a line in a mouse drag event
Posted by Armando Galicia on Nov-08-2012 08:27
Hi Peter,


Thanks for your response, I will look at this, keep you informed if I get any trouble. Thanks!!
Peter Kwan wrote:

Hi Armando,

If you want to have full feature graphics editing (to draw things, and to modify, edit,
reposition, change colors, .... and to do it interactively with the mouse), then you would
need to have or develop a graphics editing component, which is something similar to
Windows Paint or a very simple Photoshop. You can then use ChartDirector to create a
chart, and use your graphics editing component to draw things on the chart image created
by ChartDirector. It is similar to drawing things on top of a digital photograph.

If you would like something very simple, you can write code to handle the mouse events
and then draw the lines (overriding the OnPaint method and use standad GDI methods to
draw lines).

Regards
Peter Kwan