大网数据广告活动
Windows 系统接口

Control Properties

· 52CE 我爱测

In addition to properties defined and implemented by the control itself, ActiveX controls technology also involves:

In addition to properties defined and implemented by the control itself, ActiveX controls technology also involves:

Ambient properties

These are exposed by the container through a control client site to provide environmental values that apply to all controls embedded in the container. For example, a container can provide a default background color or a default font that the control can use. Ambient properties are exposed through IDispatch implemented on a container's site object. The container calls the control's IOleControl::OnAmbientPropertyChange method when any of its ambient properties change value. In response, a control may need to update its own internal or visual state in response. The container indicates which ambient property changed with the DISPID parameter or may pass DISPID_UNKNOWN to indicate that multiple ambient properties changed.

Extended properties

These are actually implemented by a container to wrap the controls it contains to provide container-managed properties that appear as if they were native control properties. The container can aggregate the control, adding the extended properties to supplement or override the control's properties. The aggregated object is called an extended control. To the container, the extended control appears as the control itself and extended properties appear to be exposed by the control. The container supports an extended control through its client site method IOleControlSite::GetExtendedControl. The GetExtendedControl method allows controls to navigate through the site to the extended control object provided for them by the container, if the container supports this feature. A container can also choose to show property pages for its extended controls in addition to those pages that a control would normally specify through ISpecifyPropertyPages. Because of this, a control has to ask a container to show a property frame before the control attempts to do so itself. The control calls IOleControlSite::ShowPropertyFrame to do this. If the container implements this function then it shows the property frame itself; if the method returns an error then the control can show the property frame.

For more information, see the following topics:

Related topics

Control Methods

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。