OleComponent.IOleComponent.OnActivationChange Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Notify component when a new object is being activated. Simply calls through to OnActivationChangeCore(IOleComponent, Int32, OLECRINFO[], Int32, OLECHOSTINFO[], UInt32).
virtual void Microsoft.VisualStudio.OLE.Interop.IOleComponent.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) = Microsoft::VisualStudio::OLE::Interop::IOleComponent::OnActivationChange;
virtual void Microsoft.VisualStudio.OLE.Interop.IOleComponent.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) = Microsoft::VisualStudio::OLE::Interop::IOleComponent::OnActivationChange;
void Microsoft.VisualStudio.OLE.Interop.IOleComponent.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);
void IOleComponent.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 Microsoft.VisualStudio.OLE.Interop.IOleComponent.OnActivationChange : Microsoft.VisualStudio.OLE.Interop.IOleComponent * int * Microsoft.VisualStudio.OLE.Interop.OLECRINFO[] * int * Microsoft.VisualStudio.OLE.Interop.OLECHOSTINFO[] * uint32 -> unit
override this.Microsoft.VisualStudio.OLE.Interop.IOleComponent.OnActivationChange : Microsoft.VisualStudio.OLE.Interop.IOleComponent * int * Microsoft.VisualStudio.OLE.Interop.OLECRINFO[] * int * Microsoft.VisualStudio.OLE.Interop.OLECHOSTINFO[] * uint32 -> unit
Sub OnActivationChange (pic As IOleComponent, fSameComponent As Integer, pcrinfo As OLECRINFO(), fHostIsActivating As Integer, pchostinfo As OLECHOSTINFO(), dwReserved As UInteger) Implements IOleComponent.OnActivationChange
Parameters
- pic
- IOleComponent
If non-NULL, then this is the component that is being activated.
- fSameComponent
- Int32
True if pic
is the component that called this method.
- fHostIsActivating
- 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
- OLECHOSTINFO[]
If fHostIsActivating
is TRUE (1) then this is the hosts OLECHOSTINFO,
otherwise this is null.
- dwReserved
- 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