다음을 통해 공유


IOleInPlaceComponentUIManager.OnUIComponentEnterState Method

Definition

Informs the environment that an in-place VSPackage object has entered a new state.

public:
 void OnUIComponentEnterState(System::UInt32 dwCompRole, System::UInt32 dwStateId, System::UInt32 dwReserved);
public:
 void OnUIComponentEnterState(unsigned int dwCompRole, unsigned int dwStateId, unsigned int dwReserved);
void OnUIComponentEnterState(unsigned int dwCompRole, unsigned int dwStateId, unsigned int dwReserved);
public void OnUIComponentEnterState (uint dwCompRole, uint dwStateId, uint dwReserved);
abstract member OnUIComponentEnterState : uint32 * uint32 * uint32 -> unit
Public Sub OnUIComponentEnterState (dwCompRole As UInteger, dwStateId As UInteger, dwReserved As UInteger)

Parameters

dwCompRole
UInt32

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

dwStateId
UInt32

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

dwReserved
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.

Applies to