IOleInPlaceSiteEx::OnInPlaceActivateEx  2RW10RP

Called by the embedded object to determine if it needs to redraw itself upon activation.

HRESULT OnInPlaceActivateEx(

    BOOL* pfNoRedraw,

//Pointer to current redraw status

    DWORD dwFlags

//Indicates whether the object is windowless

   );

 

 

Parameters

pfNoRedraw

[out] Pointer to current redraw status. The status is TRUE if the object need not redraw itself upon activation; FALSE if the object needs to redraw upon activation. Windowless objects usually do not need the value returned by this parameter and may pass a NULL pointer to save the container the burden of computing this value.

dwFlags

[in] Indicates whether the object is activated as a windowless object. This parameter takes values from the ACTIVATEFLAGS35FCHW5 enumeration. See IOleInPlaceSiteWindowlessPGBTG4 for more information on windowless objects.

 

Return Values

This method supports the standard return value E_UNEXPECTED, as well as the following:

S_OK

The container allows the in-place activation.

 

Remarks

This method replaces IOleInPlaceSite::OnInPlaceActivate. If the older method is used, the object must always redraw itself on activation.

Windowless objects are required to use this method instead of IOleInPlaceSite::OnInPlaceActivate to notify the container of whether they are activating windowless or not.

Notes to Implementers

The container should carefully check the invalidation status of the object, its z-order, clipping and any other relevant parameters to determine the appropriate value to return in pfNoRedraw.

A container can cache the value of the ACTIVATEFLAGS enumeration instead of calling the GetWindow method in the IOleInPlaceObjectWindowless interface repeatedly.

See Also

ACTIVATEFLAGS, IOleInPlaceSite::OnInPlaceActivate, IOleInPlaceObjectWindowless, IOleInPlaceSiteWindowless