IOleDocumentView

The IOleDocumentView interface enables a container to communicate with each view supported by a document object.

A document object that supports multiple views of its data represents each view as a separate object. Each document view object implements IOleDocumentView, along with IOleInPlaceObject, IOleInPlaceActiveObject, and optional interfaces such as IPrint and IOleCommandTarget. A document object that supports only a single view does not require that view to be implemented as a separate object. Instead, both document and view can be implemented as a single class.

When to Implement

All document objects must implement IOleDocumentView for each view they support. If a document object supports multiple views, each view must be implemented as a separate class object. If a document object supports only a single view, the document object and its view can both be implemented as a single class.

When to Use

A container calls the methods of this interface to activate, deactivate, close, and generally communicate with a document view object.

Methods in VTable Order

IUnknown Methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.

IOleDocumentView Methods Description
SetInPlaceSite Associates a container view site with this view.
GetInPlaceSite Retrieves the view site associated with this view.
GetDocument Obtains the IUnknown pointer of the document object that owns this view.
SetRect Sets the coordinates of the view port.
GetRect Retrieves the coordinates last passed in SetRect
SetRectComplex Sets the coordinates of the view port, scroll bars, and size box.
Show In-place activates or deactivates a view.
UIActivate In-place activates or deactivates a view's user-interface elements.
Open Displays view in a separate pop-up window
Close Instructs view to close
SaveViewState Saves view state into stream
ApplyViewState Initializes view with view state previously saved in call to SaveViewState.
Clone Creates a duplicate view object.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in docobj.h.

See Also

TBD