Once you have created a custom control, your application must add the control to a form with IASForm::Add. After a control is added, the form initializes the control by invoking the IASControl::Init method. This method provides the control with the following data:
The control can obtain this pointer by calling QueryInterface on the form’s IASForm interface.
This pointer is NULL if the form has not implemented an event sink.
The form can also set one or more of the control properties with the appropriate IASControl::put_* method. Methods commonly invoked include: IASControl::put_Visible and IASControl::SetBounds. These methods can be invoked later.
Controls should not start processing until their form invokes IASControl::Start. To verify if a control has been started, invoke the IASControl::IsStarted method. To shut the control down, a form invokes the control’s IASControl::Close method. When this occurs, a control should take the following actions:
A control should not release itself until all external reference counts on it have been released.