共用方式為


COleControl::WillAmbientsBeValidDuringLoad

Determines whether your control should use the values of ambient properties as default values, when it is subsequently loaded from its persistent state.

BOOL WillAmbientsBeValidDuringLoad( );

Return Value

Nonzero indicates that ambient properties will be valid; otherwise ambient properties will not be valid.

Remarks

In some containers, your control may not have access to its ambient properties during the initial call to the override of COleControl::DoPropExchange. This is the case if the container calls IPersistStreamInit::Load or IPersistStorage::Load prior to calling IOleObject::SetClientSite (that is, if it does not honor the OLEMISC_SETCLIENTSITEFIRST status bit).

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::DoPropExchange

COleControl::GetAmbientProperty

Other Resources

COleControl Members