|
This is a collection of answers to frequently asked questions of DynaPlot users.
How much is a DynaPlot runtime license?
Question
We want to include DynaPlot in our new application. How much do you charge for a runtime license on
each product we sell?
Answer
DynaPlot is royalty-free. To use DynaPlot in your application you only need a
developer license which will allow you to use the control in a development environment. To unlock DynaPlot for use in an IDE
you need an unlock key which you will receive when you register the control.
To run
the final application which includes a DynaPlot control, no license and therefore no unlock key is required. As a consequence you need not and according to the license agreement also must not
pass the unlock key on to the users of your application.
Top
Problems installing an application on Win 95 and Win NT targets
Question
When trying to install our application, which includes a DynaPlot control, on a Windows 95 or Windows
NT machine I get an error message which says that dynaplot.ocx is not registered. I suspected that
some of the DLLs which DynaPlot requires were missing, but all files listed in columns "Windows 95"
and "Windows NT" of chapter "Distributing Applications" are present on the target machine. What am I missing?
Answer
Distributing and installation applications for the various Microsoft operating systems is complicated
by the fact that some of the dynamically liked libraries (DLLs) which come with the operating systems
carry the same name but represent completely different versions of the respective library.
Examples are the MFC4.2
libraries which come with all operating systems, of which only the versions from 1998 onwards work with DynaPlot, however.
A second complication arises from Microsoft's strategy to make the
Internet Explorer (IE) an integral part of the operating system. IE comes with several DLLs which have, as a matter of fact,
become part of the operating system and every application which wants to use advanced internet functionality requires these DLLs. This is why the DLLs which come with IE4 or later are required for
DynaPlot.
The same argument as mentioned before applies: files urlmon.dll etc. are present in a Win95 system
- only the later versions which come with IE4 and above will satisfy DynaPlot, however.
To make sure that your application will run on any operating system, you should check for the
presence and the version numbers or creation dates of the required files and install missing libraries
if necessary. You can also instruct the users of your application to install IE4 and the MFC DLLs in a separate session before they install your application.
The install script of the DynaPlot development package for example includes a few lines of code,
which check if the MFC libraries and the VB runtime libraries are present and will abort the installation unless the appropriate files are found. The user can then download and install the missing
files and try again. You may adopt a similar strategy or - at the expense of file size - include all necessary DLLs in your distribution package right away.
A tool which is quite useful when preparing an installation package is the dependency walker
depends.exe. This freeware program is part of Visual Studio but can also be downloaded from the web (http://www.dependencywalker.com). When you load dynaplot.ocx into depends.exe, the program
will tell you which DLLs are missing and it will also highlight incompatible DLLs.
Top
DynaPlot always draws a line from the last curve point to the origin
Question
DynaPlot always draws a line from the last point of my curve to the origin. I am using Visual Basic.
Answer
First time users of DynaPlot and Visual Basic very often trip over this obstacle.
Regard the following code:
|
Const N = 20
Dim Y(N) As Double Dim X(N) As Double
Private Sub Form_Load() Dim i As Integer For i = 0 To N - 1
X(i) = i Y(i) = i * i Next
DynaPlot1.DataCurves.Add "Curve1", X, Y, -1, True End Sub
|
With statements Dim X (N) and Dim Y (N) the program allocates arrays with entries for indices from 0
through N. The commonly made mistake is to assume that the size of the arrays is N while it really is N+1.
Consequently, the for-statement only fills the first N entries of both arrays leaving the coordinates of
the last curve point undefined. VB sets these values to zero and this is the reason why we seen an unexpected last curve point at the origin.
Top
How can I hide the cursor area?
Question
I want to display the cursor coordinates somewhere else on my page. Is there a possibility to switch
the built-in cursor display off?
Answer
Yes, there is. Simply set the SizingFactor of the cursor's TextDescriptor equal to zero. In VB this is:
|
DynaPlot1.TextDescriptors.CursorText.SizingFactor = 0
|
This rule applies to all text elements: setting its TextDescriptor's SizingFactor = 0 will hide the text
element. To hide the numbers along the abscissa, for example, write:
|
DynaPlot1.TextDescriptors.XNumText.SizingFactor = 0
|
Top
How can I change or disable a command key ?
Questions
|
 |
I want to use a
different key than the standard "t" for the zoom-out function. Can I change the default behavior?
|
|
 |
Is is possible to disable a function altogether?
|
Answer
DynaPlot includes a flexible method of linking keyboard and mouse messages to program actions - the
action map. The action map is a list of key-value pairs, which can be altered by the client application.
The key part of the mapping is a Windows message, given by a message constant, a modifier and the
ASCII value of the letter. The value part of the mapping is one of DynaPlot's action function constants
. If a keyboard or mouse message is sent to DynaPlot and a matching action map entry is found, the corresponding action function is executed.
It is possible to have multiple map entries point to the same action function, but it is not possible to
execute more than one action for any given message.
To change the mapping for the zoom-out command we first look up the default setting in chapter
Default Action Map Entries of the manual and find
WM_KEYDOWN,0,'t',dpsZOOMOUT
We cannot remove this map entry, but we can route key 't' to a function which performs no action -
dpsNAUGHT.
|
Const WM_KEYDOWN = &H100
DynaPlot1.Action.SetActionMapEntry WM_KEYDOWN, 0, Asc("t"), dpsNAUGHT
|
Next, we create a new entry for our own, preferred key - say 'q'.
|
DynaPlot1.Action.SetActionMapEntry WM_KEYDOWN, 0, Asc("q"), dpsZOOMOUT
|
The second part of the question has been answered already. If you wish to disable a command,
overwrite its action map entry with a new mapping which points to dpsNAUGHT, as in the first of the above two steps.
Top
Do I have to uninstall my DynaPlot control before installing the new DynaPlot3 control?
Question
I have DynaPlot2 installed on my computer. Do I have to uninstall the old control before I install the
new control DynaPlot3?
Answer
No, you can keep the old control. Because it is a new control and by default is installed in a separate
folder DynaPlot3 can coexist with previous versions.
Top
Will the application I wrote for DynaPlot also run with DynaPlot3?
Question
I have an application which uses DynaPlot2. Will this application work with the new control DynaPlot3?
Answer
DynaPlot3 is a new control and an application written for previous versions of DynaPlot will not
recognize DynaPlot3. If you want your application to use DynaPlot3 you will have to replace the existing control in the source code and rebuild your application.
Top
How do I upgrade an existing application to DynaPlot3?
Question
I have an application which uses DynaPlot2. How do I convert this application so it can use DynaPlot3?
Answer
DynaPlot version 2.xx and DynaPlot3 are not source code compatible. The programming interface of
DynaPlot3 differs from the one of its predecessor and offers many more functions. Some properties or methods had to be moved or renamed and the signatures of some methods were changed.
Conversion program DynaPlot3UpgradeAssistant which is delivered with the control can automatically convert most of the changed constructs. However, in those cases where the program has not enough
information you need to do some additional editing. Currently DynaPlot3UpgradeAssistant can only convert Visual Basic projects.
The best way to convert an existing application is to
- Make a backup of your project, because DynaPlot3UpgradeAssistant will overwrite files during
conversion process
- Run DynaPlot3UpgradeAssistant on the project file (*.vbp) and the form files (*.frm) of your VB project
- Have the programming reference of DynaPlot3 ready and
- Go through all form-files and look for the lines where the upgrade assistant left a remark that
editing is required
- Perform the remaining conversion steps manually
Top
Will I have to convert all my applications to DynaPlot3 once I install the new control?
Question
I am using DynaPlot2 in several applications. Will these applications still work after I install the new
control or will I have to convert them to DynaPlot3?
Answer
Existing applications which use previous versions of DynaPlot need not to be converted. Because
DynaPlot3 is a new control, old application which use DynaPlot2 will still run.
Top
|