IOleDocumentView interface

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.

Members

The IOleDocumentView interface inherits from the IUnknown interface. IOleDocumentView also has these types of members:

Methods

The IOleDocumentView interface has these methods.

MethodDescription
ApplyViewState

Initializes a view with view state previously saved in call to IOleDocumentView::SaveViewState.

Clone

Creates a duplicate view object.

CloseView

Instructs a view to close itself and releases its IOleInPlaceSite pointer.

GetDocument

Obtains the IUnknown pointer of the document object that owns this view.

GetInPlaceSite

Retrieves the view site associated with this view object.

GetRect

Retrieves the rectangular coordinates of the viewport in which the view is or will be activated.

Open

Displays a document view in a separate pop-up window.

SaveViewState

Saves the view state into the specified stream.

SetInPlaceSite

Associates a container's document view site with a document's view object.

SetRect

Sets the rectangular coordinates of the viewport in which the view is to be activated.

SetRectComplex

Sets the rectangular coordinates of the viewport, scroll bars, and size box.

Show

Activates or deactivates a view.

UIActivate

Activates or deactivates a document view's user interface elements, such as menus, toolbars, and accelerators.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

DocObj.h

IDL

DocObj.Idl

IID

IID_IOleDocumentView is defined as b722bcc6-4e68-101b-a2bc-00aa00404770

 

 

Community Additions

ADD
Show:
© 2014 Microsoft