Modifying a Control's Run-Time Behavior
After you insert a control and generate one or more wrapper classes, you can invoke the control's methods and program the control's event handlers. Use the online help to see which methods and events a control supports.
The control's wrapper classes specify the functions you can use to modify the run-time behavior of the control. Simply include the appropriate wrapper class header file, and use the methods. To set a property, look for an accessor method with the property name prefixed by Set. To retrieve a property, look for an accessor method with the property name prefixed by Get. Event handlers can be written after you generate them in ClassWizard.
Since the controls are implemented using Automation, the types passed can only be Automation-safe types such as BSTR and VARIANT. While you can use system calls to allocate and set BSTRs and VARIANTs, you may want to use the ATL wrapper classes (, ), the Visual C++ COM Compiler support wrapper classes (, ), or the MFC wrapper class ().
If you add a data-source control, ClassWizard will generate wrapper classes for the data-source control's coclasses that manage its internal data objects. These classes do not include all of RDO or ADO, but rather represent internal objects declared in the type library.
If you want to use ADO and RDO directly, you should connect to the ADO or RDO DLLs directly (MSADO15.dll or MSRDO20.dll), either via the , which support the #import directive, or via the respective SDK.
Back to Using ActiveX Controls.