The IOleInPlaceSiteEx interface provides an additional set of activation and deactivation notification methods that enable an object to avoid unnecessary flashing on the screen when the object is activated and deactivated.
When an object is activated, it does not know if its visual display is already correct. When the object is deactivated, the container does not know if the visual display is correct. To avoid a redraw and the associated screen flicker in both cases, the container can provide this extension to IOleInPlaceSite.
Implement this interface on the client site in a container application that supports flicker-free activation and deactivation of embedded, in-place active objects.
An embedded object, such as a control, calls the methods in this interface to determine if it needs to redraw itself on activation and to notify the container if the object needs to be redrawn on deactivation. By avoiding the redraw when it is not needed, you can reduce the amount of flashing on the screen.
If the site object does not support IOleInPlaceSiteEx, the object must call methods in the IOleInPlaceSite interface instead. In this case, the object must redraw itself on activation and deactivation.
IUnknown Methods | Description |
---|---|
QueryInterface | Returns a pointer to a specified interface. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IOleWindow Methods | Description |
---|---|
GetWindow | Gets a window handle. |
ContextSensitiveHelp | Controls enabling of context-sensitive help. |
IOleInPlaceSite Methods | Description |
---|---|
CanInPlaceActivate | Determines if the container can activate the object in place. |
OnInPlaceActivate | Notifies the container that one of its objects is being activated in place. |
OnUIActivate | Notifies the container that the object is about to be activated in place, and that the main menu will be replaced by a composite menu. |
GetWindowContext | Enables an in-place object to retrieve window interfaces that form at the window object hierarchy, and the position in the parent window to locate the object's in-place activation window. |
Scroll | Specifies the number of pixels by which the container is to scroll the object. |
OnUIDeactivate | Notifies the container to reinstall its user interface and take focus. |
OnInPlaceDeactivate | Notifies the container that the object is no longer active in place. |
DiscardUndoState | Instructs the container to discard its undo state. |
DeactivateAndUndo | Deactivate the object and revert to undo state. |
OnPosRectChange | Object's extents have changed. |
IOleInPlaceSiteEx Methods | Description |
---|---|
OnInPlaceActivateEx | Called by the embedded object to determine if it needs to redraw itself upon activation. |
OnInPlaceDeactivateEx | Notifies the container of whether the object needs to be redrawn upon deactivation. |
RequestUIActivate | Notifies the container that the object is about to enter the UI-active state. |
Windows NT: Use version 4.0 or later. New for OC96.
Windows: Use Windows 95 or later. New for OC96.
Windows CE: Unsupported.
Header: Declared in ocidl.h.