IASControl::Init

This method initializes a new control.

Syntax

HRESULT Init( short wID, IDispatch *pdispParent, IDispatch pdispEventSink );

Parameters

wID
Short integer that contains the identifier of the control.
pdispParent
Pointer to the object that owns the control.
pdispEventSink
Pointer to the default event sink for the control. Use NULL if the owner is not to receive events.

Return Values

NOERROR indicates success. If an error occurs, the appropriate HRESULT value is returned.

Remarks

Following initialization, the control must be started with IASControl::Start before processing can start. An application does not call IASControl::Start explicitly. The parent form of the control calls IASControl::Start when the form starts, or the IASForm::Add method calls IASControl::Start internally when you add a control to a form you have already started.

See Also

IFMDraw, IASControl::Start, IASEventSink, IASControl::Close, IASForm::Add