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
'Déclaration
Private Sub OnActivationChange ( _
pic As IOleComponent, _
fSameComponent As Integer, _
pcrinfo As OLECRINFO(), _
fHostIsActivating As Integer, _
pchostinfo As OLECHOSTINFO(), _
dwReserved As UInteger _
) Implements IOleComponent.OnActivationChange
'Utilisation
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
- pic
Type: Microsoft.VisualStudio.OLE.Interop.IOleComponent
If non-NULL, then this is the component that is being activated.
- fSameComponent
Type: System.Int32
True if pic is the component that called this method.
- pcrinfo
Type: array<Microsoft.VisualStudio.OLE.Interop.OLECRINFO[]
OLECRINFO of pic if is non-null.
- 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.
- pchostinfo
Type: array<Microsoft.VisualStudio.OLE.Interop.OLECHOSTINFO[]
If fHostIsActivating is TRUE (1) then this is the hosts OLECHOSTINFO, otherwise this is null.
- dwReserved
Type: System.UInt32
Reserved for future use, should be 0.
Implements
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.PlatformUI.OleComponentSupport Namespace