IOleDocument::EnumViewsIOleDocument::EnumViews*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IOleDocument::CreateView
*Next Topic: IOleDocument::GetDocMiscStatus

IOleDocument::EnumViews

HRESULT EnumViews(
    IEnumOleDocumentViews ** ppEnum,
    IOleDocumentView ** ppView
   );

Creates an object that enumerates the views supported by an Active Document, or, if only one view is supported, returns a pointer to that view.

ppEnum
[out] Address of the IEnumOleDocumentViews interface pointer on the enumerator object.
ppView
[out] Address of the IOleDocumentView interface on a single view object.

If an Active Document supports multiple views of its data, it must also implement IEnumOleDocumentViews and place that interface's pointer in ppEnum. Using this pointer, the container can enumerate the views supported by the Active Document.

If the Active Document supports only a single view, IOleDocument::EnumViews places that view's IOleDocumentView pointer in ppView.

Notes to Callers

Call this method to determine if an Active Document supports more than one view of its data. If it does, the caller can use the pointer written to ppEnum to specify which view to activate. When finished with the pointer, the caller must free it by calling IUnknown::Release.

Notes to Implementers

This method must be completely implemented on all Active Documents; E_NOTIMPL is not an acceptable return value.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.