IOleInPlaceComponent.OnWindowActivate Method
Informs an in-place VSPackage object of important window activation events.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣告
Function OnWindowActivate ( _
dwWindowType As UInteger, _
fActivate As Integer _
) As Integer
'用途
Dim instance As IOleInPlaceComponent
Dim dwWindowType As UInteger
Dim fActivate As Integer
Dim returnValue As Integer
returnValue = instance.OnWindowActivate(dwWindowType, _
fActivate)
int OnWindowActivate(
uint dwWindowType,
int fActivate
)
int OnWindowActivate(
[InAttribute] unsigned int dwWindowType,
[InAttribute] int fActivate
)
abstract OnWindowActivate :
dwWindowType:uint32 *
fActivate:int -> int
function OnWindowActivate(
dwWindowType : uint,
fActivate : int
) : int
Parameters
- dwWindowType
Type: System.UInt32
[in] Specifies the type of window that is being activated. For a list of valid dwWindowType values, see OLEACTIVATE.
- fActivate
Type: System.Int32
[in] Flag that is set to true if the window is activating and false if it is deactivating.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From oleipc.idl:
HRESULT IOleInPlaceComponent::OnWindowActivate(
[in] DWORD dwWindowType,
[in] BOOL fActivate
);
The OnWindowActivate method communicates the same information to an in-place VSPackage object that the innermost active object gets through OnFrameWindowActivate and OnDocWindowActivate. If an in-place object assuming the role of main component or subcomponent is the UI active object, only OnWindowActivate will be called. If the UI active object is assuming the role of a component control, only OnDocWindowActivate will be called.
.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.