grab handles

TeeChart for ActiveX, COM and ASP
Post Reply
tics
Newbie
Newbie
Posts: 1
Joined: Mon Apr 14, 2008 12:00 am

grab handles

Post by tics » Sun Dec 13, 2009 3:54 pm

Hi there,

We’ve incorporated your TChart control into a SCADA application written in VB6. There is a ‘display designer’ that enables our customer to arrange various controls such as text boxes, shapes, pictures as they desire – all of which dynamically update from data sources that come from an industrial data network (e.g. – warning labels hide/show when data in the field changes). The customer can also assign live data collated from the field to the TChart control and trend real-time plant data – i.e. boiler temperatures.

The customer can position/re-size all controls in this ‘display designer’ because we’ve written routines that place ‘grab handles’ around the control and trap events using sub-classing. Unfortunately, we can’t implement this feature with the TChart because the objects handle doesn’t appear to be exposed in TChart’s object model (every other control has a hWnd property).

We could work it out by using the API to enumerate all child handles on the parent container and using exceptions to remove all the other known handles – although this solution won’t work if there is more than one TChart. We notice that TChart exposes the handle of its background picture for custom drawing, but this doesn’t appear to be the main handle.

Any thoughts?

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: grab handles

Post by Yeray » Thu Dec 24, 2009 12:33 pm

Hi tics,

Find attached an example in Visual C++ that uses a handle window to redraw the chart. We think that this would be a possible solution for you if you don't want a live chart. Otherwise, if you want to obtain a live chart, I'm afraid that the only possibility would be creating a new chart at runtime and cloning the old one.

I hope it helps.
Attachments
ChartDraw.zip
(530.31 KiB) Downloaded 405 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply