共用方式為


COleClientItem::Deactivate

Call this function to deactivate the OLE item and free any associated resources.

void Deactivate( );

Remarks

You typically deactivate an in-place active OLE item when the user clicks the mouse on the client area outside the bounds of the item. Note that deactivating the OLE item will discard its undo state, making it impossible to call the ReactivateAndUndo member function.

If your application supports undo, do not call Deactivate; instead, call DeactivateUI.

For more information, see IOleInPlaceObject::InPlaceDeactivate in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem::ReactivateAndUndo

COleClientItem::DeactivateUI