COleControl::ResetStockProps

初始化 COleControl 股票属性的状态为其默认值。

void ResetStockProps( );

备注

属性是:外观、BackColor、BorderStyle、说明,启用,字体、前景色、HWND和文本。 有关常用属性的说明,请参见 ActiveX控件:添加常用属性

可以改进控件的二进制初始化性能使用 ResetStockPropsResetVersion 重写 COleControl::OnResetState。 请参见下面的示例。 有关优化初始化的详细信息,请参见 ActiveX控件:优化

示例

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

   // initialize custom properties here
}

要求

Header: afxctl.h

请参见

参考

COleControl Class

层次结构图

COleControl::ResetVersion

COleControl::SerializeStockProps