OleComponent.IOleComponent.OnActivationChange Method

Notify component when a new object is being activated. Simply calls through to OnActivationChangeCore.

Namespace:  Microsoft.VisualStudio.PlatformUI.OleComponentSupport
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

‘선언
Private Sub OnActivationChange ( _
    pic As IOleComponent, _
    fSameComponent As Integer, _
    pcrinfo As OLECRINFO(), _
    fHostIsActivating As Integer, _
    pchostinfo As OLECHOSTINFO(), _
    dwReserved As UInteger _
) Implements IOleComponent.OnActivationChange
‘사용 방법
Dim instance As OleComponent
Dim pic As IOleComponent
Dim fSameComponent As Integer
Dim pcrinfo As OLECRINFO()
Dim fHostIsActivating As Integer
Dim pchostinfo As OLECHOSTINFO()
Dim dwReserved As UInteger

CType(instance, IOleComponent).OnActivationChange(pic, fSameComponent, _
    pcrinfo, fHostIsActivating, pchostinfo, _
    dwReserved)
void IOleComponent.OnActivationChange(
    IOleComponent pic,
    int fSameComponent,
    OLECRINFO[] pcrinfo,
    int fHostIsActivating,
    OLECHOSTINFO[] pchostinfo,
    uint dwReserved
)
private:
virtual void OnActivationChange(
    IOleComponent^ pic, 
    int fSameComponent, 
    array<OLECRINFO>^ pcrinfo, 
    int fHostIsActivating, 
    array<OLECHOSTINFO>^ pchostinfo, 
    unsigned int dwReserved
) sealed = IOleComponent::OnActivationChange
private abstract OnActivationChange : 
        pic:IOleComponent * 
        fSameComponent:int * 
        pcrinfo:OLECRINFO[] * 
        fHostIsActivating:int * 
        pchostinfo:OLECHOSTINFO[] * 
        dwReserved:uint32 -> unit 
private override OnActivationChange : 
        pic:IOleComponent * 
        fSameComponent:int * 
        pcrinfo:OLECRINFO[] * 
        fHostIsActivating:int * 
        pchostinfo:OLECHOSTINFO[] * 
        dwReserved:uint32 -> unit 
JScript does not support explicit interface implementations.

Parameters

  • fSameComponent
    Type: System.Int32
    True if pic is the component that called this method.
  • fHostIsActivating
    Type: System.Int32
    If pic is null and this is TRUE (1) it indicates the host is activating. If pic is null and this is FALSE (0) then there is no current active object.
  • dwReserved
    Type: System.UInt32
    Reserved for future use, should be 0.

Implements

IOleComponent.OnActivationChange(IOleComponent, Int32, array<OLECRINFO[], Int32, array<OLECHOSTINFO[], UInt32)

Remarks

If pic is being activated and pcrinfo.grf has the ExclusiveBorderSpace bit set, component should hide its border space tools (toolbars, status bars, etc.); component should also do this if host is activating and pchostinfo.grfchost has the ExclusiveBorderSpace bit set. In either of these cases, component should unhide its border space tools the next time it is activated.

If pic is being activated and pcrinfo.grf has the ExclusiveActivation bit set, then pic is being activated in "ExclusiveActive" mode. Component should retrieve the top frame window that is hosting pic (via pic.HwndGetWindow(WindowTypes.WindowToplevel, 0)). If this window is different from component's own top window, component should disable its windows and do other things it would do when receiving OnEnterState(ComponentState.Modal, TRUE) notification.

Otherwise, if component is top-level, it should refuse to have its window activated by appropriately processing WM_MOUSEACTIVATE (see WM_MOUSEACTIVATE note below). Component should remain in one of these states until the ExclusiveActive mode ends, indicated by a future call to OnActivationChange with ExclusiveActivation bit not set or with NULL pcrinfo WM_MOUSEACTIVATE Note (for top level compoenents and host): If the active (or tracking) comp's reg info indicates that it wants mouse messages, then no MA_xxxANDEAT value should be returned from WM_MOUSEACTIVATE, so that the active (or tracking) comp will be able to process the resulting mouse message. If one does not want to examine the reg info, no MA_xxxANDEAT value should be returned from WM_MOUSEACTIVATE if any comp is active (or tracking). One can query the reg info of the active (or tracking) component at any time via IOleComponentManager.FGetActiveComponent

.NET Framework Security

See Also

Reference

OleComponent Class

OleComponent Members

Microsoft.VisualStudio.PlatformUI.OleComponentSupport Namespace