Olectra Chart FAQ

General Questions

When I buy Olectra Chart, what do I get in the package?
What is the maximum number of data points supported by Olectra Chart?
Does Olectra Chart support printing?
What methods are provided by Olectra Chart to export the graph?
What output formats does Olectra Chart support?
Is Olectra Chart compatible with Win32s?
Can I allow the user to interact with the chart at run-time?
Can I use Olectra Chart as an ActiveX control in Internet Explorer?

Technical Tips

Distributing an application using the VB 4.0 Setup Wizard.
MFC tips - realizing a chart, inserting data, destroying the chart and window correctly.
Changing chart properties using the Application Wizard with more than one control on the form.
Closing an Olectra Chart-based application built at the SDK or MFC.
List of constants for Microsoft Visual C++ 4.X.
Programming ActionMaps in the 2D OCX using Visual Basic
System resource level problem (16 bit)
User access to the Properties Page
Passing data directly to a chart
Files to include when distributing Olectra Chart
Layout for the .DAT file

General Questions

What do I get in the Olectra Chart package?

You get a CD with the control on it, along with 4 printed manuals (one for each DLL and one for each OCX), a Getting Started Guide and a Registration Guide. The control itself is broken down as follows: separate 2D and 3D controls broken into both an OCX and a DLL and all of this comes as both 16 and 32-bit.

What is the maximum number of data points supported by Olectra Chart?

There is no implicit limit on the number of points. The limit will be determined by the amount of system memory and available resources your system has. NOTE: These limits will be reached sooner in a 16-bit environment than they will in a 32-bit environment.

Does Olectra Chart support printing and if so, is it easy to do?

Yes! Olectra Chart supports printing directly to a printer with a single call. Along with this direct method, there is an alternative method available allowing you to create your own layout on the page as well.

What methods are provided by Olectra Chart to export the graph?

There are four ways to export the graph image for use elsewhere. These four methods are: printing directly to a printer, drawing to a file, copying to the clipboard and drawing to a Device Context (DC).

What output formats does Olectra Chart support?

Olectra Chart supports exporting in the form of Windows Bitmap (BMP), MetaFile (WMF) and Enhanced MetaFile (WMF).

Is Olectra Chart compatible with Win32s?

Yes! Olectra Chart supports Win32s in any language that supports Win32s (eg. ANSI C, Visual C++).

Can I allow the user to interact with the chart at run-time?

Yes! Olectra Chart has four methods for use in allowing the user to get/set information in the chart at run-time. These functions allow what is sometimes called 'drill-down' based applications.

Can I use Olectra Chart as an ActiveX control in Internet Explorer?

Yes. Some testing has been done with our control and Internet Explorer along with the ActiveX Control Pad and it works well.

Technical Tips

I am a Visual Basic 4.0 user and I am having troubles distributing my application using the VB Setup Wizard. What do I need to do?

In order to make this work, there are a few things that you need to do. In order to make it work for you, you must run the Setup Wizard once in order for it to create a file named SWDEPEND.INI. This file gets created in your \WINDOWS directory. This file needs some additions made to it so that it will properly include all the files needed for Olectra Chart and also to register the control in the Registry properly. The text below can be pasted into the SWDEPEND.INI in order to achieve this.

[OLCH2X32.OCX]
Register=$(DLLSelfRegister)
Dest=$(WinSysPath)
Uses1=OCX Runtime Support
Uses2=OLCH2D32.DLL
Uses3=

[OLCH3X32.OCX]
Register=$(DLLSelfRegister)
Dest=$(WinSysPath)
Uses1=OCX Runtime Support
Uses2=OLCH3D32.DLL
Uses3=

[OLCH2X16.OCX]
Register=$(DLLSelfRegister)
Dest=$(WinSysPath)
Uses1=OLCH2D16.DLL
Uses2=XRTCLIBB.DLL
Uses3=

[OLCH3X16.OCX]
Register=$(DLLSelfRegister)
Dest=$(WinSysPath)
Uses1=OLCH3D16.DLL
Uses2=XRTCLIBB.DLL
Uses3=

I am using MFC and need to know the basics of realizing a chart, putting some data into it and then destroying the chart and window correctly. What do I do?

Take a look at one of the following samples depending on how you are programming the control. Both of these examples use the 2D control, but should be very easy to convert in order to make use of the 3D control.

Simple MFC Dialog using the DLL DLG-DLL.ZIP
Simple MFC Dialog using the OCX DLG-OCX.ZIP

I can't change the properties of the chart when using the Application Wizard with more than one control on the form. What do I need to do to correct this?

Some background on the problem first. The programmers at Microsoft have done some optimization in the VC++ environment to try and speed things up. Because of this, they have overlooked a key point when it comes to property pages. When you bring up a property page for a control, the VC++ environment builds its own copy of the page (usually one row of tabs). When you then close the Property Page, VC++ only hides the window, and does not destroy it. What this means is, that when you drop more than one copy of the control onto the form, the Property Page will only reference the first control that the Property Page was used with. Well, fortunately there is a workaround. After selecting the control with the left mouse-button, use the right mouse-button to bring up the menu. Here is where the change comes in. Instead of selecting 'Properties' from the bottom of the menu, chose the option labeled 'Olectra Chart Properties' which then offers a secondary drop down menu. In this menu there are two options: 'Edit' and 'Properties'. Choose the properties option and you will get a property page, but it will have two rows of tabs in it. This is Olectra Chart's Property Page and not one created by VC++. By using this method on each copy of the control, you will then be able to set the properties on each copy of the control without the intervention of the VC++ optimization bug.

I am getting a resource leak when I close my Olectra Chart based application built at the SDK or MFC? Is this a bug?

No. There is a function that must be used in the shut-down section of your code that is not documented in the manual (Oooops!), but was documented in the README.WRI file as it was only noticed too late to add to the current version of the documenatation. Here is the documentation on the function called XrtDestroy() and Xrt3dDestroy().

The XrtDestroy() procedure destroys the chart and releases all memory used by the chart.

void
XrtDestroy(
HXRT2D hChart
)

hChart is the chart handle. If you have not detached the window by calling XrtDetachWindow(), XrtDestroy() will destroy the window for you. Note that destroying the window will not free the memory referenced by the chart handle. You must call XrtDestroy() in order to release the memory associated with the control.

The Xrt3dDestroy() procedure destroys the chart and releases all memory used by the chart.

void
Xrt3dDestroy(
HXRT3D hChart
)

hChart is the chart handle. If you have not detached the window by calling Xrt3dDetachWindow(), Xrt3dDestroy() will destroy the window for you. Note that destroying the window will not free the memory referenced by the chart handle. You must call Xrt3dDestroy() in order to release the memory associated with the control.

I am using Microsoft Visual C++ 4.X and I don't have the constants for the control as Developer Studio does not generate a file for them? Where can I get the list of constants?

It was an oversight on our part at the time of release. You can download a copy of a constants file (has them for both 2D and 3D) using this link:

CONST.ZIP

When programming the ActionMaps in the 2D OCX through Visual Basic 4.0, how do I get the oc2dActionTranslate and the oc2dActionScale methods to work?

Well, these two actions are a little trickier than the rest. Both of these actions require two calls in a row in order to simulate the method performed with the mouse. When using the mouse, values are recorded when the left mouse-button is pressed, and then again when the left mouse-button is released. Here is a code sample that illustrates this:

Private Sub Command1_Click()
Chart2D1.CallAction oc2dActionModifyStart, 30, 30
Chart2D1.CallAction oc2dActionScale, 30, 30
Chart2D1.CallAction oc2dActionScale, 100, 100
Chart2D1.CallAction oc2dActionModifyEnd, 100, 100
End Sub

When using the Property Page in 16-bit OCX a lot, the system resource level drops. Is this a bug?

No it is not a bug in our code. There is a Microsoft Knowledge Base entry that covers this issue. In it they state there is and will not be a fix for this issue.

I am developing with the OCX and want to give users access to the Property Page (PPG), but I only want to give access to only some of the functionality provided there. Is this possible?

No. The PPG is actually generated by OLE, and we do not have control over it to the degree necessary to support this request. This means that access to the PPG is available, but it is either all or nothing.

I am developing in Visual Basic 4.0 with the OCX and want to pass data directly to the chart without having to loop through the data in order to load it. Is this possible?

No. VB does not support the passing of addresses (like 'C' does). Because of this, this request is not possible. When Data Binding is implemented (in version 2.0 of Olectra Chart), this will not be an issue any more, because you will be able to tie the control to your data source.

I have built an application that involves Olectra Chart. What files do I need to include in order to distribute my application?

The files needed are as follows:

For 32-bit:

MFC40.DLL
MSVCRT40.DLL
OLEPRO32.DLL

For 16-bit:

OC25.DLL
XRTCLIBB.DLL

I know you have a .DAT data file for loading data. How is it laid out?

The layout of the .DAT files are laid out in DLL Manuals.

2D manual Page 132
3D manual Page 112