IOleInPlaceComponentUIManager.OnUIComponentEnterState Method
Informs the environment that an in-place VSPackage object has entered a new state.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaración
Sub OnUIComponentEnterState ( _
dwCompRole As UInteger, _
dwStateId As UInteger, _
dwReserved As UInteger _
)
'Uso
Dim instance As IOleInPlaceComponentUIManager
Dim dwCompRole As UInteger
Dim dwStateId As UInteger
Dim dwReserved As UInteger
instance.OnUIComponentEnterState(dwCompRole, _
dwStateId, dwReserved)
void OnUIComponentEnterState(
uint dwCompRole,
uint dwStateId,
uint dwReserved
)
void OnUIComponentEnterState(
[InAttribute] unsigned int dwCompRole,
[InAttribute] unsigned int dwStateId,
[InAttribute] unsigned int dwReserved
)
abstract OnUIComponentEnterState :
dwCompRole:uint32 *
dwStateId:uint32 *
dwReserved:uint32 -> unit
function OnUIComponentEnterState(
dwCompRole : uint,
dwStateId : uint,
dwReserved : uint
)
Parameters
- dwCompRole
Type: System.UInt32
[in] Role of the in-place object that has entered the new state. For a list of valid dwCompRole values, see OLEROLE.
- dwStateId
Type: System.UInt32
[in] Identifier representing the new state. For a list of valid dwStateId values, see _OLECSTATE.
- dwReserved
Type: System.UInt32
[in] Reserved for future use. Must be set to 0.
Remarks
When an in-place VSPackage object managed by the SOleComponentUIManager service enters a new state, it calls OnUIComponentEnterState. One of the important states is the modal state, signifying that a modal dialog is visible. The SOleComponentUIManager informs all of the in-place objects that are affected by user interface changes and the innermost UI active object.
Any in-place object taking on the role of main component with subcomponents is responsible for notifying these sub-component objects of the new state. The subcomponent objects in turn should perform the necessary processing based on the state being entered. For a list of valid states, see _OLECSTATE.
The OnUIComponentEnterState method is analogous to the OnComponentEnterState method, which informs the SOleComponentManager service about changes in states that do not affect the user interface.
The SOleComponentUIManager uses the dwCompRole parameter to determine which in-place objects must be notified of the state change. If the caller is a main component, then typically only the innermost UI active object requires notification. The main component must notify its subcomponents by calling OnEnterState.
If the caller is a component control, it must be UI active.
If a sub-component is the caller of this method, the SOleComponentUIManager notifies both the main component and the UI active component. The sub-component must be prepared to receive the re-entrant OnEnterState call that comes before the OnUIComponentEnterState returns.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IOleInPlaceComponentUIManager Interface