IOleInPlaceComponentUIManager.OnUIComponentEnterState 方法

通知环境的就地 VSPackage 对象进入了一个新的状态。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Sub OnUIComponentEnterState ( _
    dwCompRole As UInteger, _
    dwStateId As UInteger, _
    dwReserved As UInteger _
)
void OnUIComponentEnterState(
    uint dwCompRole,
    uint dwStateId,
    uint dwReserved
)

参数

  • dwCompRole
    类型:System.UInt32
    [in] 输入的新状态就地对象的作用。有关有效的 dwCompRole 值列表,请参见 OLEROLE
  • dwStateId
    类型:System.UInt32
    [in] 表示新状态的标识符。有关有效的 dwStateId 值列表,请参见 _OLECSTATE
  • dwReserved
    类型:System.UInt32
    [in] 留作未来使用。必须设置为 0。

备注

SOleComponentUIManager 服务 (iis) 的就地 VSPackage 对象进入新状态时,将调用 OnUIComponentEnterState。一个重要状态是该模式状态,表示一个模式对话框可见。SOleComponentUIManager 通知受用户界面更改和最内层的 UI 活动对象的影响的任何就地对象。

采用主要组件的角色中的所有就地对象与子组件的注意到新状态的这些子组件对象负责。子组件对象应随后执行基于该状态的必需的处理已编码。有关有效的状态列表,请参见 _OLECSTATE

OnUIComponentEnterState 方法类似于 OnComponentEnterState 方法,以便通知更改的 SOleComponentManager 服务在状态发生不影响用户界面。

SOleComponentUIManager 使用 dwCompRole 参数确定必须注意哪些就地对象状态转换。如果调用方是一个主要组件,则通常仅最内层的 UI 有效的对象需要通知。主要组件必须通过调用 OnEnterState通知其子组件。

如果调用方是一个组件控件,它必须是 UI 活动的。

如果子组件是此方法的调用方, SOleComponentUIManager 通知主要组件和 UI 活动部分。还必须准备的子组件接收重入 OnEnterState 调用,在 OnUIComponentEnterState 返回。

.NET Framework 安全性

请参见

参考

IOleInPlaceComponentUIManager 接口

Microsoft.VisualStudio.Shell.Interop 命名空间