|
|
GraphLite control
There is quite a number of controls I am planning to do, but with so precious little time to do them in. Bah, deadlines...
Some time ago, a site-visitor asked me about Graph controls in WTL, and
I had to refer to the scores of professional reporting components available (as
ActiveX controls).
The original sample was developed by Sam Huggill and can be seen at the link below. It displays both Bar and Line charts, has axis with flexible tick markers and even displays a legend bar. How it worksThe GraphLite control is a subclassed window.
To use it, place a static control (label) on your dialog.
In the OnInitDialog() event handler, add the following lines:
The initialization phase is rather long and complex.
The sample included with the code should clear things up.
But essentially you add data to the control and it displays it.
The control uses floating points internally,
which does increase the size of your app a bit and also prevents
the ability of doing an NotesThe original VB sample is actually implemented as an OCX. People looking
for an ActiveX version may have a closer look at that. But of course,
now you will have the entire VB Runtime environment as a dependency.
Source Code DependenciesMicrosoft Visual C++ 6.0Microsoft WTL 3.1 Library See AlsoMy (ultra light) Pie control.Useful LinksSam Huggill's VB sampleDownload Files
Written by Bjarke Viksoe. Article submitted 3/16/2002. To the top
|
|||