|To do this, let us
first open the project we used to perform the earlier test and then open the form
containing our "Circle" control in it.
(a) Testing a Property: To test the newly added property "CircleShape", let us first select
the Circle control on the form. Now we should the new property in the property listbox
Now change the "CircleShape" property value
from "FALSE" to "TRUE". This will add the following code in the form's
m_Circle1.CircleShape = TRUE;
Note the VB-like coding syntax in the above property
statement. Also note that the properties of RAD C++ controls are set through "3-way
Now recompile the project and run the test application.
Our control will now show as a perfectly round circle (figure below).
(b) Testing an Event: To
test a RAD C++ event, double-click on the Circle control to display "RadVC
CodeBar". From the "Proc" combobox, select the event "ClickIn".
This will add the following
code in the form's constructor.
ClickIn, CForm1, Circle1_ClickIn)
..and the following
code in the form's class declaration..
event handler will be introduced in the form's implementation file
(c) Testing a Method: To
test our 'Circle' control's "AboutBox" method, We will
create a command button on the form and override the button's
'Click' event. Now simply call the control's method from inside
the 'Click' event handler..
Next >> Part
10: Creating ActiveX Control from C++ Control