SimpleEditorView.OnActivationChange 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当激活新对象时调用。
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)
参数
- pic
- IOleComponent
IOleComponent 如果它是正在激活的视图本身,则为; 否则为 null 。
- fSameComponent
- Int32
true 如果与 pic 此方法的被调用方是相同的组件,则为; 否则为 false 。
- fHostIsActivating
- Int32
true 如果正在激活的主机,则为; 否则为 false 。
- pchostinfo
- OLECHOSTINFO[]
结构的数组 OLECHOSTINFO ,表示主机信息。
- dwReserved
- UInt32
留待将来使用。
实现
注解
如果正在 pic 激活并 pcrinfo[0].grfcrf 设置了 <xref:Microsoft.VisualStudio.OLE.Interop.OLECRF.olecrfExclusiveBorderSpace> 位,则 "边框空间工具" (工具栏、状态栏等 ) 必须处于隐藏状态。 如果是正在激活并设置了位的主机 pchostinfo[0].grfchostf <xref:Microsoft.VisualStudio.OLE.Interop.OLECHOSTF.olechostfExclusiveBorderSpace> ,则还必须隐藏边框空间工具。 在这两种情况下,将在下一次激活视图时取消隐藏边框空间工具。
如果正在 pic 激活并 pcrinfo[0].grfcrf 设置了 <xref:Microsoft.VisualStudio.OLE.Interop.OLECRF.olecrfExclusiveActivation> 位,则 pic 将在 ExclusiveActive 模式下激活。 如果承载的顶级框架窗口 pic 不同于视图的顶级框架窗口,则该视图应禁用其窗口,并在收到通知时执行操作 OnEnterState 。 否则,如果视图是顶级的,则应拒绝通过适当处理使其窗口被激活 <xref:Microsoft.VisualStudio.NativeMethods.WM_MOUSEACTIVATE> 。 在 ExclusiveActive 模式结束之前,该组件应保持为其中一种状态,这是由对 OnActivationChange 未设置或为的位进行的后续调用指示的 <xref:Microsoft.VisualStudio.OLE.Interop.OLECRF.olecrfExclusiveActivation> null``pcrinfo 。