Udostępnij za pośrednictwem


IOleComponent.OnActivationChange Method

Notifies the component when a new object is being activated.

Namespace:  Microsoft.VisualStudio.OLE.Interop
Assembly:  Microsoft.VisualStudio.OLE.Interop (in Microsoft.VisualStudio.OLE.Interop.dll)

Syntax

'Declaration
Sub OnActivationChange ( _
    pic As IOleComponent, _
    fSameComponent As Integer, _
    pcrinfo As OLECRINFO(), _
    fHostIsActivating As Integer, _
    pchostinfo As OLECHOSTINFO(), _
    dwReserved As UInteger _
)
void OnActivationChange(
    IOleComponent pic,
    int fSameComponent,
    OLECRINFO[] pcrinfo,
    int fHostIsActivating,
    OLECHOSTINFO[] pchostinfo,
    uint dwReserved
)
void OnActivationChange(
    [InAttribute] IOleComponent^ pic, 
    [InAttribute] int fSameComponent, 
    [InAttribute] array<OLECRINFO>^ pcrinfo, 
    [InAttribute] int fHostIsActivating, 
    [InAttribute] array<OLECHOSTINFO>^ pchostinfo, 
    [InAttribute] unsigned int dwReserved
)
abstract OnActivationChange : 
        pic:IOleComponent * 
        fSameComponent:int * 
        pcrinfo:OLECRINFO[] * 
        fHostIsActivating:int * 
        pchostinfo:OLECHOSTINFO[] * 
        dwReserved:uint32 -> unit 
function OnActivationChange(
    pic : IOleComponent, 
    fSameComponent : int, 
    pcrinfo : OLECRINFO[], 
    fHostIsActivating : int, 
    pchostinfo : OLECHOSTINFO[], 
    dwReserved : uint
)

Parameters

  • fSameComponent
    Type: System.Int32
    true if pic is the same as the callee of this method, otherwise false.
  • fHostIsActivating
    Type: System.Int32
    true if the host that is being activated, otherwise false.

Remarks

If pic is non-nulla null reference (Nothing in Visual Basic), then it is the component that is being activated. In this case, fSameComponent is true if pic is the same component as the callee of this method, and pcrinfo is the registry information of pic. If pic is nulla null reference (Nothing in Visual Basic) and fHostIsActivating is true, then the host is the object being activated, and pchostinfo is its host info. If pic is nulla null reference (Nothing in Visual Basic) and fHostIsActivating is false, then there is no current active object.

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

If pic is being activated and pcrinfo has olecrfExclusiveActivation is set, then pic is being activated in ExclusiveActive mode. The component should retrieve the top frame window that is hosting pic (via [HwndGetWindow(olecWindowFrameToplevel,0)]). If this window is different from the component's own top frame window, the component should disable its windows and do what it would do when receiving [OnEnterState(olecstateModal,true)] notification.

Otherwise, if the component is top-level, it should refuse to have its window activated by appropriately processing WM_MOUSEACTIVATE. The component should remain in one of these states until the ExclusiveActive mode ends, indicated by a future call to IOleComponent.OnActivationChange with ExclusiveActive not set or with a nulla null reference (Nothing in Visual Basic) pcrinfo.

.NET Framework Security

See Also

Reference

IOleComponent Interface

Microsoft.VisualStudio.OLE.Interop Namespace