Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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)

void OnUIComponentEnterState (
	[InAttribute] unsigned int dwCompRole, 
	[InAttribute] unsigned int dwStateId, 
	[InAttribute] unsigned int dwReserved
)
void OnUIComponentEnterState (
	/** @attribute InAttribute() */ UInt32 dwCompRole, 
	/** @attribute InAttribute() */ UInt32 dwStateId, 
	/** @attribute InAttribute() */ UInt32 dwReserved
)
function OnUIComponentEnterState (
	dwCompRole : uint, 
	dwStateId : uint, 
	dwReserved : uint
)

Parameters

dwCompRole

[in] Role of the in-place object that has entered the new state. For a list of valid dwCompRole values, see OLEROLE.

dwStateId

[in] Identifier representing the new state. For a list of valid dwStateId values, see _OLECSTATE.

dwReserved

[in] Reserved for future use. Must be set to 0.

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.