Implementing IOleInPlaceObject

The IOleInPlaceObject interface manages the activation and deactivation of in-place objects and determines how much of the in-place object should be visible. ActiveX Designer objects (at both design time and run time) that present a user interface must implement this interface to support in-place activation. Hosts call its methods to activate and deactivate the visual interface.

The interface includes the four methods listed in the following table. The InPlaceDeactivate, UIDeactivate, and SetObjectRect methods are required. ReactivateAndUndo is optional for ActiveX Designers. If you choose not to implement it, return E_NOTIMPL.

Method

Description

InPlaceDeactivate

Deactivates an active in-place object (required).

ReactivateAndUndo

Reactivates a previously deactivated object (optional).

SetObjectRects

Defines the portion of the in-place object that should be visible (required).

UIDeactivate

Deactivates and removes the user interface of the active object (required).


See the COM Programmer's Reference in the Platform Software Development Kit (SDK) of MSDN for more information on IOleInPlaceObject.