Borland C++ Builder generates wrapper classes for each object on an ActiveX
control. Builder does not support "chained" method calls. Instead, you
must use the wrapper classes to obtain a reference to a subobject, and then
call the desired properties or methods on the subobject. Use the Class View
in Builder to determine the names of the wrapper objects that Builder has
created. (You may have to access the control, by typing CWPID1-> in the
code window in order for the Classes View to be refreshed).
To access the Autotune (CWAutotune) object of the CWPID control, you must
use the CWAutotuneDispT class. Drop the T in the code window.
The following code sample shows to use the ShowDialog of the Autotune object
in Borland C++ Builder:
CWPIDAutotuneDisp aut
otune;
autotune = CWPID1->Autotune;
autotune.ShowDialog(cwpidAutotuneMax);
This same format is used to access any ComponentWorks ActiveX control from
Borland C++ Builder. The NI Technical Support Web pages include several
examples that demonstrate using ComponentWorks in Borland C++ Builder. Refer
to these examples to learn the general guildelines for programming, and then
you apply them to your particular project by using the appropriate wrapper
classes and methods for the controls you are using.
Regards,
Denise Riedlinger
ComponentWorks
Raphael Zwiker wrote:
>Hi,>>I try to use the PID-component in Borland C++ 4.0.>>It works well with
the properties at design-time. But if I try to change>parameters or start
the autotune, it doesn't know any methodes of>CWParameters/CWPIDAutotune.>>I
try this source:>>void __fastcall TForm1::ButtonStartAutotuneClick(TObject
*Sender)>{> CWPID1->Autotune->ShowDialog(cwpidAutotune100ms);>}>>If I compile
this source,
it shows the error "'ShowDialog' ist kein>Element von 'CWPIDAutotune'">The
installation of the ActiveX is correct, because the component works>(inclusive
Autotune) in Visual C++ 6.0.>>Can you help me, please?>>Regards Raphael