Partager via


SimpleEditorView.OnActivationChange Method

Definition

Called when a new object is being activated.

public:
 virtual 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:
 virtual 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);
 virtual 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 virtual 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
override this.OnActivationChange : Microsoft.VisualStudio.OLE.Interop.IOleComponent * int * Microsoft.VisualStudio.OLE.Interop.OLECRINFO[] * int * Microsoft.VisualStudio.OLE.Interop.OLECHOSTINFO[] * uint32 -> unit
Public Overridable Sub OnActivationChange (pic As IOleComponent, fSameComponent As Integer, pcrinfo As OLECRINFO(), fHostIsActivating As Integer, pchostinfo As OLECHOSTINFO(), dwReserved As UInteger)

Parameters

pic
IOleComponent

IOleComponent if it is the view itself that is being activated, otherwise null.

fSameComponent
Int32

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

pcrinfo
OLECRINFO[]

An array of OLECRINFO structures, which represent registry information for pic.

fHostIsActivating
Int32

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

pchostinfo
OLECHOSTINFO[]

An array of OLECHOSTINFO structures, which represent host information.

dwReserved
UInt32

Reserved for future use.

Implements

Remarks

If pic is being activated and pcrinfo[0].grfcrf has the <xref:Microsoft.VisualStudio.OLE.Interop.OLECRF.olecrfExclusiveBorderSpace> bit set, the border space tools (toolbars, status bars, etc.) must be hidden. If it is the host that is being activated and pchostinfo[0].grfchostf has the <xref:Microsoft.VisualStudio.OLE.Interop.OLECHOSTF.olechostfExclusiveBorderSpace> bit set, the border space tools must be hidden as well. In either of these cases, the border space tools should be unhidden the next time the view is activated.

If pic is being activated and pcrinfo[0].grfcrf has the <xref:Microsoft.VisualStudio.OLE.Interop.OLECRF.olecrfExclusiveActivation> bit is set, then pic is being activated in ExclusiveActive mode. If the top frame window that is hosting pic is different from the view's own top frame window, the view should disable its windows and do what it would do when receiving OnEnterState notification. Otherwise, if the view is top-level, it should refuse to have its window activated by appropriately processing <xref:Microsoft.VisualStudio.NativeMethods.WM_MOUSEACTIVATE>. The component should remain in one of these states until the ExclusiveActive mode ends, indicated by a future call to OnActivationChange with the <xref:Microsoft.VisualStudio.OLE.Interop.OLECRF.olecrfExclusiveActivation> bit not set or with a null``pcrinfo.

Applies to