The RAD C++ control ("Circle") we
made in the Control Development Kit (CDK)
consists of many different type of files. The control is declared in a header file called
"Circle.h", implemented in "Circle.cpp" and its resources are defined
and described in "Circle.rh" and "Circle.rc". As discussed in the CDK,
this "source" type of controls provide the maximum flexibility in component
reuse, since the user has the freedom to not only extend / inherit the control
functionality but also he / she can modify its very source code. However problem arises
while deploying this kind of "source" controls in the user's system, since the
user has to copy these files manually one by one to his or her system. One easy solution of avoiding the complexity of managing these
different type of source files is to create an
ActiveX control out of the C++ control. An ActiveX control consists of only one file
("circle.ocx"), but this largely prohibits the task of extending the control
functionality (a term called "implementation inheritance"). Furthermore, the
user of the control has to make sure that the control is registered in his / her system
for this to work properly.
The issue of "implementation inheritance" with
the ActiveX type of controls can be resolved by creating a
MFC extension control, but with this type of controls, the user won't be enjoying the
freedom of manipulating the control source code. Again, the user needs to make sure that
the control libraries (a .lib and a .dll file) are deployed in his / her system.
Thus in summery, in whatever form (source / ActiveX /
library) we decide the controls should be distributed to the user's system, we need to
make sure that they are packaged / assembled properly with the right set of files on our
(control publisher) end, and also they are deployed / installed properly in the user's
machine in their original forms.
RadVC's "Single Click Setup" technology
simplifies this job of assembly and deployment by creating one single setup file.
The setup files for RAD C++ controls are nothing but self-extracting executables that
archive various files related to a single RAD C++ control. These setup files install
themselves automatically in the clients machine by extracting the component files to the
client's machine and performing additional jobs such as control registration and inserting
them into the RadVC toolbox.
How to Create a Setup file for a
RAD C++ Control
To create a setup file for a RAD C++ control, click the
right mouse button on the control tool button in RadVC toolbox and select "Create
Setup" context menu item (figure below):
This will display "RadVC Archiving
Utility" window as shown below:
The files shown in the list control (under
the header "Files") are the files that going to be archived in a setup file
called "circle.exe". You can edit / change the name and location of this file by
clicking the browse button with caption ("...").
To add additional files to the archive,
click on the button with caption '+' and then browse the files to add. For example, if
your source type control uses a helper class then you need to add the file(s) that
declares and implements that class. Also use this option when you create a setup file for
a "Library" type control. In this case you need to
add the library files (.lib and .dll) to the archive.
To remove any unnecessary files from the
archive files, select the file in the list control and click on the button with '-'. For
example, if we have made an ActiveX control from the C++ control, the file list will
display the ActiveX control file ("Circle.ocx") and an interface header file
called "iCircle.h". Thus if we decide to create a setup file for a
"source" type control, we should remove these two files, since the user can
always create those files by using the "Single
Click ActiveX" option.
The following table displays the name of
files for different type of RAD C++ controls.
Control Type |
Files to Archive |
Source |
Circle.h,
Circle.cpp, Circle.rc, Circle.rh, Circle.bmp |
Interface |
iCircle.h,
Circle.ocx |
ActiveX |
Circle.ocx |
Library |
Circle.h,
Circle.bmp, Circle.lib, Circle.dll (For more click here) |
Once you finish adding / removing the files
from the file list, then click on the "Archive" button, this will create the
setup files for the RAD C++ control, "Circle.exe" as shown below.
Next>> Part 12:
Deploy / Install the Control
Related Links: |