COleControl::ResetStockProps

Initializes the state of the COleControl stock properties to their default values.

void ResetStockProps( );

Remarks

The properties are: Appearance, BackColor, BorderStyle, Caption, Enabled, Font, ForeColor, hWnd, and Text. For a description of stock properties, see ActiveX Controls: Adding Stock Properties.

You can improve a control's binary initialization performance by using ResetStockProps and ResetVersion to override COleControl::OnResetState. See the example below. For further information on optimizing initialization, see ActiveX Controls: Optimization.

Example

void CMyAxCtrl::OnResetState()
{
   ResetVersion(MAKELONG(_wVerMinor, _wVerMajor));
   ResetStockProps();

   // initialize custom properties here
}

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::ResetVersion

COleControl::SerializeStockProps