Condividi tramite


IOleComponent.OnActivationChange Method

Definition

Notifies the component when a new object is being activated.

public:
 void OnActivationChange(Microsoft::VisualStudio::OLE::Interop::IOleComponent ^ pic, int fSameComponent, cli::array <Microsoft::VisualStudio::OLE::Interop::OLECRINFO> ^ pcrinfo, int fHostIsActivating, cli::array <Microsoft::VisualStudio::OLE::Interop::OLECHOSTINFO> ^ pchostinfo, System::UInt32 dwReserved);
public:
 void OnActivationChange(Microsoft::VisualStudio::OLE::Interop::IOleComponent ^ pic, int fSameComponent, Platform::Array <Microsoft::VisualStudio::OLE::Interop::OLECRINFO> ^ pcrinfo, int fHostIsActivating, Platform::Array <Microsoft::VisualStudio::OLE::Interop::OLECHOSTINFO> ^ pchostinfo, unsigned int dwReserved);
void OnActivationChange(Microsoft::VisualStudio::OLE::Interop::IOleComponent const & pic, int fSameComponent, std::Array <Microsoft::VisualStudio::OLE::Interop::OLECRINFO> const & pcrinfo, int fHostIsActivating, std::Array <Microsoft::VisualStudio::OLE::Interop::OLECHOSTINFO> const & pchostinfo, unsigned int dwReserved);
public void OnActivationChange (Microsoft.VisualStudio.OLE.Interop.IOleComponent pic, int fSameComponent, Microsoft.VisualStudio.OLE.Interop.OLECRINFO[] pcrinfo, int fHostIsActivating, Microsoft.VisualStudio.OLE.Interop.OLECHOSTINFO[] pchostinfo, uint dwReserved);
abstract member OnActivationChange : Microsoft.VisualStudio.OLE.Interop.IOleComponent * int * Microsoft.VisualStudio.OLE.Interop.OLECRINFO[] * int * Microsoft.VisualStudio.OLE.Interop.OLECHOSTINFO[] * uint32 -> unit
Public Sub OnActivationChange (pic As IOleComponent, fSameComponent As Integer, pcrinfo As OLECRINFO(), fHostIsActivating As Integer, pchostinfo As OLECHOSTINFO(), dwReserved As UInteger)

Parameters

pic
IOleComponent

The component that is being activated

fSameComponent
Int32

true if pic is the same as the callee of this method, otherwise false.

pcrinfo
OLECRINFO[]

The component registration information.

fHostIsActivating
Int32

true if the host that is being activated, otherwise false.

pchostinfo
OLECHOSTINFO[]

The OLE host information.

dwReserved
UInt32

Reserved.

Remarks

If pic is non-null, 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 null and fHostIsActivating is true, then the host is the object being activated, and pchostinfo is its host info. If pic is null 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 <xref:Microsoft.VisualStudio.OLE.Interop._OLEHOSTF.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 null``pcrinfo.

Applies to