IOleInPlaceSiteEx::OnInPlaceActivateEx method

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

Syntax


HRESULT OnInPlaceActivateEx(
  [out] BOOL  *pfNoRedraw,
  [in]  DWORD dwFlags
);

Parameters

pfNoRedraw [out]

A pointer to a variable that receives the current redraw status. The status is TRUE if the object need not redraw itself upon activation and FALSE otherwise. 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 ACTIVATEFLAGS enumeration. See IOleInPlaceSiteWindowless for more information on windowless objects.

Return value

This method returns S_OK if the container allows the in-place activation. Other possible return values include the following.

Return codeDescription
E_UNEXPECTED

An unexpected error has occurred.

 

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IOleInPlaceSiteEx is defined as 9C2CAD80-3424-11CF-B670-00AA004CD6D8

See also

IOleInPlaceSiteEx
ACTIVATEFLAGS
IOleInPlaceSite::OnInPlaceActivate
IOleInPlaceObjectWindowless
IOleInPlaceSiteWindowless

 

 

Show: