Page 1 of 1

grab handles

Posted: Sun Dec 13, 2009 3:54 pm
by 15048874
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?

Re: grab handles

Posted: Thu Dec 24, 2009 12:33 pm
by yeray
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.