Sdílet prostřednictvím


IOleInPlaceComponent.OnWindowActivate(UInt32, Int32) Method

Definition

Informs an in-place VSPackage object of important window activation events.

public:
 int OnWindowActivate(System::UInt32 dwWindowType, int fActivate);
public:
 int OnWindowActivate(unsigned int dwWindowType, int fActivate);
int OnWindowActivate(unsigned int dwWindowType, int fActivate);
public int OnWindowActivate (uint dwWindowType, int fActivate);
abstract member OnWindowActivate : uint32 * int -> int
Public Function OnWindowActivate (dwWindowType As UInteger, fActivate As Integer) As Integer

Parameters

dwWindowType
UInt32

[in] Specifies the type of window that is being activated. For a list of valid dwWindowType values, see OLEACTIVATE.

fActivate
Int32

[in] Flag that is set to true if the window is activating and false if it is deactivating.

Returns

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.

Applies to